Skip to content

Commit

Permalink
Recreate skills list (#597)
Browse files Browse the repository at this point in the history
* use BS table

* check styling

* implement i18n

* implement feedback in skillset

* Make the whole layout a bit more compact

---------

Co-authored-by: Yanick Minder <[email protected]>
Co-authored-by: megli2 <[email protected]>
Co-authored-by: Robin Steiner <[email protected]>
  • Loading branch information
4 people authored Feb 13, 2024
1 parent 7d1fed0 commit a24e862
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 36 deletions.
5 changes: 4 additions & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
%pzsh-container
%pzsh-topbar
%img{:src=> "/assets/logo.svg",:height=>"32"}
= yield
%div.container-fluid
%div.row.d-flex.justify-content-center
%div.col-8
= yield
22 changes: 19 additions & 3 deletions app/views/skills/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
- @entries.each do |skill|
%h1.display-3
= skill.title
%table.table.table-hover
%thead.table-light
%tr
%th{scope: "col"}= t "skills.table.skill"
%th.table-secondary{scope: "col"}= t "skills.table.members"
%th{scope: "col"}= t "skills.table.category"
%th.table-secondary{scope: "col"}= t "skills.table.subcategory"
%th{scope: "col"}= t "skills.table.default_set"
%th.table-secondary{scope: "col"}= t "skills.table.radar"
%th{scope: "col"}= t "skills.table.modify"
%tbody
- @entries.each_with_index do |skill|
%tr
%td= skill.title
%td.table-light= skill.people.count
%td= skill.category.title
%td.table-light= skill.category.parent.title
%td= skill.default_set.nil? ? "Neu" : (skill.default_set? ? "Ja" : "Nein")
%td.table-light= skill.radar
10 changes: 10 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
de:
skills:
table:
skill: Skill
members: Mitglieder
category: Kategorie
subcategory: Subkategorie
default_set: Default-Set
radar: Radar
modify: Ändern
41 changes: 9 additions & 32 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
# Files in the config/locales directory are used for internationalization
# and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:
#
# <%= t('hello') %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# The following keys must be escaped otherwise they will not be retrieved by
# the default I18n backend:
#
# true, false, on, off, yes, no
#
# Instead, surround them with single quotes.
#
# en:
# 'true': 'foo'
#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.

en:
hello: "Hello world"
skills:
table:
skill: Skill
members: Members
category: Category
subcategory: Subcategory
default_set: Defaultset
radar: Radar
modify: Modify

0 comments on commit a24e862

Please sign in to comment.