Skip to content
Snippets Groups Projects
Commit 3a06a54e authored by Teal Bauer's avatar Teal Bauer Committed by Teal
Browse files

Sort stages alphabetically in manage, highlight blank stage names

- Sort stages alphabetically in conference stage selection view
- Add visual indicator for stages with blank names
parent 85170cc3
No related branches found
No related tags found
1 merge request!32Sort stages alphabetically in manage, highlight blank stage names
Pipeline #38357 passed
This commit is part of merge request !32. Comments created here will be created in the context of that merge request.
...@@ -65,7 +65,7 @@ module Admin ...@@ -65,7 +65,7 @@ module Admin
end end
def select_relevant_stages def select_relevant_stages
@stages = @conference.stages @stages = @conference.stages.order(:name)
end end
def update_relevant_stages def update_relevant_stages
...@@ -74,7 +74,7 @@ module Admin ...@@ -74,7 +74,7 @@ module Admin
if @conference.save if @conference.save
redirect_to admin_conferences_path, notice: "Relevant stages updated successfully." redirect_to admin_conferences_path, notice: "Relevant stages updated successfully."
else else
@stages = @conference.stages @stages = @conference.stages.order(:name)
render :select_relevant_stages render :select_relevant_stages
end end
end end
......
...@@ -77,6 +77,11 @@ ...@@ -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" %> <%= 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"> <label for="stage_<%= stage.id %>" class="ml-3 block text-sm font-medium text-gray-700 dark:text-gray-300">
<%= stage.name %> <%= 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> </label>
</div> </div>
</li> </li>
......
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