aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-11-12 01:10:28 +0100
committerhellekin <hellekin@cepheide.org>2020-11-12 01:10:28 +0100
commit8d9387cf64929b6467b6ba52f22ca0aa5ed35782 (patch)
tree37533e75476680ebad4cd1d47e3e578b879726ba /app/views
parentb6aeac4d9274f17e748efb3715aa08f4b7c361f2 (diff)
parent757decefafb5d82557a8b7fa9691f94f19c3207e (diff)
downloadincommon-map-8d9387cf64929b6467b6ba52f22ca0aa5ed35782.tar.gz
Merged master
Diffstat (limited to 'app/views')
-rw-r--r--app/views/application/_current_agent_link.html.erb1
-rw-r--r--app/views/application/_current_agent_switch.html.erb4
-rw-r--r--app/views/application/_taxonomy_nav.html.erb6
-rw-r--r--app/views/resources/_resource.html.erb2
4 files changed, 12 insertions, 1 deletions
diff --git a/app/views/application/_current_agent_link.html.erb b/app/views/application/_current_agent_link.html.erb
new file mode 100644
index 0000000..58bf5fb
--- /dev/null
+++ b/app/views/application/_current_agent_link.html.erb
@@ -0,0 +1 @@
+<%= render partial: 'current_agent_switch' %>
diff --git a/app/views/application/_current_agent_switch.html.erb b/app/views/application/_current_agent_switch.html.erb
new file mode 100644
index 0000000..f19f26b
--- /dev/null
+++ b/app/views/application/_current_agent_switch.html.erb
@@ -0,0 +1,4 @@
+<%= form_for current_agent, url: '/my/current_agent', method: :patch do |f| %>
+ <%= f.select(:id, options_for_select(current_user.agents.map { |a| [a.name, a.id] }, selected: current_agent.id), title: "Sélectionner l'agent en cours") %>
+ <%= f.submit(" » ", title: "Activer cet Agent") %>
+<% end %>
diff --git a/app/views/application/_taxonomy_nav.html.erb b/app/views/application/_taxonomy_nav.html.erb
new file mode 100644
index 0000000..2203665
--- /dev/null
+++ b/app/views/application/_taxonomy_nav.html.erb
@@ -0,0 +1,6 @@
+<% out = []
+clazo.each do |c| %>
+ <%= tag.span(taxo.name) %> »
+ <%= link_to(c.section.category.name, c.section.category) %> »
+ <%= link_to(c.section.name, c.section) %> »
+<% end %>
diff --git a/app/views/resources/_resource.html.erb b/app/views/resources/_resource.html.erb
index 652da59..37c0d66 100644
--- a/app/views/resources/_resource.html.erb
+++ b/app/views/resources/_resource.html.erb
@@ -5,7 +5,7 @@
<time datetime="<%= h resource.updated_at %>" class="updated_at">
<p class="identifier"><%= resource_url(resource) %></p>
</header>
- <div><%= h resource.description %></div>
+ <%= m resource.description %>
<hr>
<code><pre><%= h JSON.pretty_generate(resource.feature.as_json) %></pre></code>
<nav>