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 %>
</td>
<td class="text-right">
<%= link_to t("admin.booths.booth.shifts"),
new_admin_booth_shift_path(booth),
class: "button hollow" %>
<%= link_to t("admin.actions.edit"),
edit_admin_booth_path(booth),
class: "button hollow" %>
<% if controller_name == "shifts" || controller_name == "booths" && action_name == "available" %>
<%= link_to t("admin.booths.booth.shifts"),
new_admin_booth_shift_path(booth),
class: "button hollow" %>
<%= link_to t("admin.actions.edit"),
edit_admin_booth_path(booth),
class: "button hollow" %>
<% end %>
</td>
</tr>

View File

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