Skip to content

Commit

Permalink
Reposition the event status flag and remove delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
trymebytes committed Feb 14, 2024
1 parent 7a49b55 commit a4ae874
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 14 additions & 1 deletion assets/css/translation-events.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ h2.event_page_title {
color: #fff !important;
}
span.event-list-status {
color: var(--gp-color-dark-orange);
font-weight: 500;
float: left;
padding: 0.2em 0.4em;
color: #fff;
font-size: .7em;
border-radius: 4px;
margin-right: 0.3em;
width: 6em;
text-align: center;
}
span.event-list-status.draft {
background-color: #B0C4DE;
}
span.event-list-status.publish {
background-color: #00d084;
}
8 changes: 5 additions & 3 deletions templates/events-user-created.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
$permalink = str_replace( '%pagename%', $post_name, $permalink );
?>
<li class="event-list-item">
<span class="event-list-date"><time class="event-utc-time" datetime="<?php echo esc_attr( $event_start ); ?>"></span>
<div>
<span class="event-list-status <?php echo esc_attr( get_post_status( get_the_ID() ) ); ?>"><?php echo esc_html( get_post_status( get_the_ID() ) ); ?></span>
<span class="event-list-date"><time class="event-utc-time" datetime="<?php echo esc_attr( $event_start ); ?>"></span>
</div>
<a href="<?php echo esc_url( gp_url( wp_make_link_relative( $permalink ) ) ); ?>"><?php the_title(); ?></a>
<span class="event-list-status"><?php echo 'draft' === get_post_status( get_the_ID() ) ? esc_html( '[' . get_post_status( get_the_ID() ) . ']' ) : ''; ?></span>
<a href="<?php echo esc_url( gp_url( 'events/edit/' . get_the_ID() ) ); ?>" class="button is-small action edit">Edit</a>
<a href="" class="button is-small action edit">Delete</a><p><?php the_excerpt(); ?></p>
<p><?php the_excerpt(); ?></p>
</li>
<?php
endwhile;
Expand Down

0 comments on commit a4ae874

Please sign in to comment.