aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2021-02-11 20:40:00 +0100
committerhellekin <hellekin@cepheide.org>2021-02-11 20:40:00 +0100
commite5619547d5544a043dfec173f17020b09f882a98 (patch)
treed6b127a0ea3b71d139531cfc25e2e68f558325f0 /app/views
parent7f65f49b5036e4318b91dfc1ecd3ca21bc8ba74a (diff)
downloadincommon-map-e5619547d5544a043dfec173f17020b09f882a98.tar.gz
[FIX] Availability of agents
Diffstat (limited to 'app/views')
-rw-r--r--app/views/agents/_agent.html.erb17
-rw-r--r--app/views/application/_user_info.html.erb4
-rw-r--r--app/views/layouts/application.html.erb2
-rw-r--r--app/views/taxonomies/_taxonomy.html.erb2
-rw-r--r--app/views/taxonomies/index.html.erb2
-rw-r--r--app/views/taxonomies/show.html.erb13
6 files changed, 36 insertions, 4 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 %>
diff --git a/app/views/application/_user_info.html.erb b/app/views/application/_user_info.html.erb
index 048e6fb..a1a42d2 100644
--- a/app/views/application/_user_info.html.erb
+++ b/app/views/application/_user_info.html.erb
@@ -11,3 +11,7 @@
<% end %>
</nav>
</section>
+
+<% content_for :debug do %>
+<%= @current_user.avatar_url %>
+<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 60b285a..ce42bb6 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -13,7 +13,7 @@
<%= yield :head %>
</head>
- <body>
+ <body<%= body_classes %>>
<header>
<h1><%= link_to image_tag("https://talk.incommon.cc/uploads/default/original/1X/92f926e8210ea7a5412d6e2bdabfa825233e808b.png", alt: "IN COMMON", size: "x4em"), '/' %></h1>
<%= render 'application/user_info' %>
diff --git a/app/views/taxonomies/_taxonomy.html.erb b/app/views/taxonomies/_taxonomy.html.erb
index eb2dd79..79df167 100644
--- a/app/views/taxonomies/_taxonomy.html.erb
+++ b/app/views/taxonomies/_taxonomy.html.erb
@@ -1,4 +1,4 @@
-<section id="taxonomy-<%= taxonomy.to_param %>" data-controller="taxonomy" data-taxonomy-uuid="<%= taxonomy.uuid %>">
+<section class="on" id="taxonomy-<%= taxonomy.to_param %>" data-controller="taxonomy" data-taxonomy-uuid="<%= taxonomy.uuid %>">
<h3><%= taxonomy.name %></h3>
<p class="summary"><%= h taxonomy.summary %></p>
<div class="description"><%= m taxonomy.description %></div>
diff --git a/app/views/taxonomies/index.html.erb b/app/views/taxonomies/index.html.erb
index 705b0d4..fcbcb8b 100644
--- a/app/views/taxonomies/index.html.erb
+++ b/app/views/taxonomies/index.html.erb
@@ -1,5 +1,5 @@
<section id="taxonomies">
<h2>Available Taxonomies</h2>
- <%= render collection: @taxonomies %>
+ <%= render partial: :taxonomy, collection: @taxonomies %>
</section>
diff --git a/app/views/taxonomies/show.html.erb b/app/views/taxonomies/show.html.erb
index 99e9c89..3971acf 100644
--- a/app/views/taxonomies/show.html.erb
+++ b/app/views/taxonomies/show.html.erb
@@ -1 +1,14 @@
+<%#= map_container %>
+
<%= taxonomy_filter %>
+
+<% content_for :aside do %>
+ <div class="on" data-controller="taxonomy" data-taxonomy-uuid="<%= @taxonomy.to_param %>">
+ <div class="leaflet-bar leaftlet-control" id="taxonomy-toggle">
+ <button data-action="taxonomy#toggle" data-target="taxonomy.toggle"></button>
+ </div>
+ <div data-target="taxonomy.filter"></div>
+ </div>
+<% end %>
+
+