Booths and shifts index pages minor fixes

Showing only actions to assign and edit shifits in shifts index, and option to create a new booth in booths index.
This commit is contained in:
María Checa
2017-10-02 10:25:11 +02:00
parent 14fe771fa5
commit fd1d09c8c2
2 changed files with 12 additions and 9 deletions

View File

@@ -6,11 +6,13 @@
<%= booth.location %> <%= booth.location %>
</td> </td>
<td class="text-right"> <td class="text-right">
<% if controller_name == "shifts" || controller_name == "booths" && action_name == "available" %>
<%= link_to t("admin.booths.booth.shifts"), <%= link_to t("admin.booths.booth.shifts"),
new_admin_booth_shift_path(booth), new_admin_booth_shift_path(booth),
class: "button hollow" %> class: "button hollow" %>
<%= link_to t("admin.actions.edit"), <%= link_to t("admin.actions.edit"),
edit_admin_booth_path(booth), edit_admin_booth_path(booth),
class: "button hollow" %> class: "button hollow" %>
<% end %>
</td> </td>
</tr> </tr>

View File

@@ -1,7 +1,8 @@
<h2 class="inline-block"><%= t("admin.booths.index.title") %></h2> <h2 class="inline-block"><%= t("admin.booths.index.title") %></h2>
<%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path, <% if controller_name == "booths" && action_name != "available" %>
class: "button success float-right" %> <%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path, class: "button success float-right" %>
<% end %>
<% if @booths.empty? %> <% if @booths.empty? %>
<div class="callout primary"> <div class="callout primary">