Skip to content
Snippets Groups Projects
Commit 9779c7dc authored by Teal's avatar Teal
Browse files

Merge branch 'sort-stages' into 'main'

Sort stages alphabetically in manage, highlight blank stage names

See merge request !32
parents dac40a12 3a06a54e
No related branches found
No related tags found
1 merge request!32Sort stages alphabetically in manage, highlight blank stage names
Pipeline #38359 passed
......@@ -65,7 +65,7 @@ module Admin
end
def select_relevant_stages
@stages = @conference.stages
@stages = @conference.stages.order(:name)
end
def update_relevant_stages
......@@ -74,7 +74,7 @@ module Admin
if @conference.save
redirect_to admin_conferences_path, notice: "Relevant stages updated successfully."
else
@stages = @conference.stages
@stages = @conference.stages.order(:name)
render :select_relevant_stages
end
end
......
......@@ -77,6 +77,11 @@
<%= check_box_tag "conference[relevant_stage_ids][]", stage.id, @conference.relevant_stages.include?(stage), id: "stage_#{stage.id}", class: "h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" %>
<label for="stage_<%= stage.id %>" class="ml-3 block text-sm font-medium text-gray-700 dark:text-gray-300">
<%= stage.name %>
<% if stage.name.blank? %>
<span class="inline-flex items-center px-2 py-0.5 ml-2 rounded text-xs font-medium bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300">
blank
</span>
<% end %>
</label>
</div>
</li>
......
......@@ -109,9 +109,8 @@
<% if @admin_users.any? %>
<div class="flex flex-wrap gap-2">
<% @admin_users.each do |user| %>
<%= link_to admin_user_path(user), class: "inline-flex items-center px-3 py-1 rounded-full text-sm bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200" do %>
<div class="w-5 h-5 rounded-full mr-2" style="background-color: <%= user.avatar_color %>"></div>
<%= user.name %>
<%= link_to admin_user_path(user) do %>
<%= render "application/user_avatar", user: user %>
<% end %>
<% end %>
</div>
......@@ -127,9 +126,8 @@
<% if @events_admins.any? %>
<div class="flex flex-wrap gap-2">
<% @events_admins.each do |user| %>
<%= link_to admin_user_path(user), class: "inline-flex items-center px-3 py-1 rounded-full text-sm bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200" do %>
<div class="w-5 h-5 rounded-full mr-2" style="background-color: <%= user.avatar_color %>"></div>
<%= user.name %>
<%= link_to admin_user_path(user) do %>
<%= render "application/user_avatar", user: user %>
<% end %>
<% end %>
</div>
......@@ -145,9 +143,8 @@
<% if @shift_coordinators.any? %>
<div class="flex flex-wrap gap-2">
<% @shift_coordinators.each do |user| %>
<%= link_to admin_user_path(user), class: "inline-flex items-center px-3 py-1 rounded-full text-sm bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" do %>
<div class="w-5 h-5 rounded-full mr-2" style="background-color: <%= user.avatar_color %>"></div>
<%= user.name %>
<%= link_to admin_user_path(user) do %>
<%= render "application/user_avatar", user: user %>
<% end %>
<% end %>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment