diff options
author | hellekin <hellekin@cepheide.org> | 2021-02-11 20:40:00 +0100 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2021-02-11 20:40:00 +0100 |
commit | e5619547d5544a043dfec173f17020b09f882a98 (patch) | |
tree | d6b127a0ea3b71d139531cfc25e2e68f558325f0 /app/views/agents | |
parent | 7f65f49b5036e4318b91dfc1ecd3ca21bc8ba74a (diff) | |
download | incommon-map-e5619547d5544a043dfec173f17020b09f882a98.tar.gz |
[FIX] Availability of agents
Diffstat (limited to 'app/views/agents')
-rw-r--r-- | app/views/agents/_agent.html.erb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/views/agents/_agent.html.erb b/app/views/agents/_agent.html.erb index 5a74df1..fda8bd0 100644 --- a/app/views/agents/_agent.html.erb +++ b/app/views/agents/_agent.html.erb @@ -3,13 +3,28 @@ <h1><%= link_to agent.name, agent_url(agent) %></h1> <h2><%= link_to agent_url(agent) %></h1> </head> + <% if current_agent == agent %> + <section class="agent-info"> + <h3>Vous faƮtes partie de cet agent</h3> + <p>Ainsi que <%= pluralize(agent.members.count, 'membre') %>.</p> + <nav> + <ul> + <li><%= link_to 'Edit', edit_agent_url(agent) %></li> + </ul> + </nav> + </section> + <% end %> <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 + <li><%= link_to pluralize(agent.taxonomies.count, 'Taxonomy'), agent_taxonomies_url(agent) %> with <%= pluralize(agent.categories.count, 'Category') %> and <%= pluralize(agent.sections.count, 'Section') %>.</li> </ul> </section> </article> + +<% content_for :debug do %> +<%=tag.pre agent.inspect %> +<% end %> |