diff options
author | hellekin <hellekin@cepheide.org> | 2020-10-09 10:29:34 +0200 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-10-09 10:29:34 +0200 |
commit | d242fb5bbc423876f4c192b5f133619a2d4f0113 (patch) | |
tree | 5da6478cd67c49406d8678aa7e99f949419f905c /app/views/agents/_agent.html.erb | |
parent | f48ce2f4c934fde3862cdad593eececc7a567d61 (diff) | |
download | incommon-map-d242fb5bbc423876f4c192b5f133619a2d4f0113.tar.gz |
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.
Diffstat (limited to 'app/views/agents/_agent.html.erb')
-rw-r--r-- | app/views/agents/_agent.html.erb | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ +<article class="agent" id="agent-<%= agent.to_param %>"> + <header> + <h1><%= link_to agent.name, agent_url(agent) %></h1> + <h2><%= link_to agent_url(agent) %></h1> + </head> + <section id="stats"> + <h3>Statistiques</h3> + <ul> + <li><%= link_to pluralize(agent.resources.count, 'Resource'), agent_resources_url(agent) %></li> + <li><%= pluralize(agent.taxonomies.count, 'Taxonomy') %> with + <%= pluralize(agent.categories.count, 'Category') %> and + <%= pluralize(agent.sections.count, 'Section') %>.</li> + </ul> + </section> +</article> |