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 Location</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.location_path(@conn, :update, @location)) %>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_location_path(@conn, :update, @location)) %>
<span><%= link "Back", to: Routes.location_path(@conn, :index) %></span>

View File

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

View File

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

View File

@@ -29,5 +29,5 @@
</ul>
<span><%= link "Edit", to: Routes.location_path(@conn, :edit, @location) %></span>
<span><%= link "Edit", to: Routes.admin_location_path(@conn, :edit, @location) %></span>
<span><%= link "Back", to: Routes.location_path(@conn, :index) %></span>