Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

past event listing sorting issues #71

Merged
merged 1 commit into from
Feb 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/views/events/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<table class='table table-condensed' id='table-<%= rtid %>'>
<thead>
<tr>
<th>Date</th>
<th>Event Type</th>
<th>Event</th>
<th>Action</th>
</tr>
Expand All @@ -17,9 +19,13 @@
<% events.each do |event| %>
<tr>
<td>
<span class='label label-info'><%= event.event_type.name %></span>
<strong><u><%= event.start_time.strftime("%Y-%m-%d") %></u></strong> &nbsp;
<%= link_to event_path(event), :style => 'text-decoration: none' do %>
</td>
<td>
<span class='label label-info'><%= event.event_type.name %></span>
</td>
<td>
<strong><%= truncate(event.descriptive_name, :length => 60) %></strong>
<% end %>
<span class='label label-success'><%= link_to event.chapter.name, chapter_path(event.chapter), :style => 'text-decoration: none; color: inherit;' %></span>
Expand Down Expand Up @@ -53,6 +59,6 @@
<%= render partial: 'shared/datatable' %>
<% if local_assigns[:enable_datatable] %>
<script>
$('#table-<%= rtid %>').DataTable({});
$('#table-<%= rtid %>').DataTable({"order": [[ 0, "desc" ]]});
</script>
<% end %>