diff options
Diffstat (limited to 'app/views/agents/_agent.html.erb')
-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 %> |