diff options
author | hellekin <hellekin@cepheide.org> | 2021-01-22 05:32:15 +0100 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2021-01-22 05:32:15 +0100 |
commit | b54a8458d5029b3494165b7430e21b3ae34ecc0c (patch) | |
tree | 32ea6fc6b8774f672325fec52f0ffc97229a9568 /app/views/categories/_category.html.erb | |
parent | 1c1aead78192982e221179de6688b944e5b01bf6 (diff) | |
download | incommon-map-b54a8458d5029b3494165b7430e21b3ae34ecc0c.tar.gz |
Upgrade Rails and add StimulusJS support
Diffstat (limited to 'app/views/categories/_category.html.erb')
-rw-r--r-- | app/views/categories/_category.html.erb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb new file mode 100644 index 0000000..d301fe6 --- /dev/null +++ b/app/views/categories/_category.html.erb @@ -0,0 +1,17 @@ +<article class="category" id="category-<%= category.id %>"> + <header style="background-color: <%= category.color %>"> + <h1><%= category.taxonomy.name %></h1> + <h2><%= category.name %></h2> + </header> + <p><%= h category.summary %></p> + <div class="markdown"><%= h category.description %></div> + <section id="stats"><h3>Info</h3> + <p><%= pluralize(category.sections_count, 'section') %></p> + <p><%= pluralize(category.sections.map { |s| s.resources }.sum(&:count) || 0, 'resources') %></p> + </section> + <section id="actions"> + <ul> + <li><%= link_to 'edit', edit_category_path(category) %></li> + </ul> + </section> +</article> |