diff --git a/app/views/admin/poll/booths/_booth.html.erb b/app/views/admin/poll/booths/_booth.html.erb index 80b1ef38f..921361c4a 100644 --- a/app/views/admin/poll/booths/_booth.html.erb +++ b/app/views/admin/poll/booths/_booth.html.erb @@ -6,11 +6,13 @@ <%= booth.location %> - <%= 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 %> - \ No newline at end of file + diff --git a/app/views/admin/poll/booths/index.html.erb b/app/views/admin/poll/booths/index.html.erb index 05044dd0e..95b248b3f 100644 --- a/app/views/admin/poll/booths/index.html.erb +++ b/app/views/admin/poll/booths/index.html.erb @@ -1,7 +1,8 @@

<%= t("admin.booths.index.title") %>

-<%= 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? %>