From d242fb5bbc423876f4c192b5f133619a2d4f0113 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 9 Oct 2020 10:29:34 +0200 Subject: Scope routes to Agent Since an Agent is required for all records, we scope the routes and get it present for free ;) This commit also adds resource views. --- app/views/agents/_agent.html.erb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/views/agents/_agent.html.erb (limited to 'app/views/agents/_agent.html.erb') diff --git a/app/views/agents/_agent.html.erb b/app/views/agents/_agent.html.erb new file mode 100644 index 0000000..5a74df1 --- /dev/null +++ b/app/views/agents/_agent.html.erb @@ -0,0 +1,15 @@ +
+
+

<%= link_to agent.name, agent_url(agent) %>

+

<%= link_to agent_url(agent) %>

+ +
+

Statistiques

+
    +
  • <%= link_to pluralize(agent.resources.count, 'Resource'), agent_resources_url(agent) %>
  • +
  • <%= pluralize(agent.taxonomies.count, 'Taxonomy') %> with + <%= pluralize(agent.categories.count, 'Category') %> and + <%= pluralize(agent.sections.count, 'Section') %>.
  • +
+
+
-- cgit v1.2.3