Admin actions behind admin path.

This commit is contained in:
codevictory
2021-04-20 23:09:00 +03:00
parent cac837be20
commit b06bae000f
14 changed files with 32 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
<h1>Edit Performance</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.performance_path(@conn, :update, @performance)) %>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performance_path(@conn, :update, @performance)) %>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>

View File

@@ -19,12 +19,12 @@
<td>
<span><%= link "Show", to: Routes.performance_path(@conn, :show, performance) %></span>
<span><%= link "Edit", to: Routes.performance_path(@conn, :edit, performance) %></span>
<span><%= link "Delete", to: Routes.performance_path(@conn, :delete, performance), method: :delete, data: [confirm: "Are you sure?"] %></span>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, performance) %></span>
<span><%= link "Delete", to: Routes.admin_performance_path(@conn, :delete, performance), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Performance", to: Routes.performance_path(@conn, :new) %></span>
<span><%= link "New Performance", to: Routes.admin_performance_path(@conn, :new) %></span>

View File

@@ -1,5 +1,5 @@
<h1>New Performance</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.performance_path(@conn, :create)) %>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performance_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>

View File

@@ -19,5 +19,5 @@
</ul>
<span><%= link "Edit", to: Routes.performance_path(@conn, :edit, @performance) %></span>
<span><%= link "Edit", to: Routes.admin_performance_path(@conn, :edit, @performance) %></span>
<span><%= link "Back", to: Routes.performance_path(@conn, :index) %></span>