diff --git a/app/assets/stylesheets/themengruppen.css.scss b/app/assets/stylesheets/themengruppen.css.scss index 5ea80bc..5aa1f26 100644 --- a/app/assets/stylesheets/themengruppen.css.scss +++ b/app/assets/stylesheets/themengruppen.css.scss @@ -4,8 +4,8 @@ div.themengruppe {padding:10px; margin:2px; -border-radius:10px; +border-radius: 10px; min-width:13em; -border: #91B4FF solid 2px; +border: #91B4FF solid 0px; height: 90% } diff --git a/app/models/themengruppe.rb b/app/models/themengruppe.rb index 034558f..0966914 100644 --- a/app/models/themengruppe.rb +++ b/app/models/themengruppe.rb @@ -1,4 +1,5 @@ class Themengruppe < ActiveRecord::Base + WORD_COUNT = 50 attr_accessible :text, :title has_many :themen, class_name: 'Thema' has_many :fragen, through: :themen diff --git a/app/views/themen/_thema.html.erb b/app/views/themen/_thema.html.erb index 50cbe00..ede7bb2 100644 --- a/app/views/themen/_thema.html.erb +++ b/app/views/themen/_thema.html.erb @@ -1,2 +1,2 @@ - <%= link_to thema.title,themengruppe_thema_path(thema.themengruppe,thema)%> + <%= thema.title%> diff --git a/app/views/themengruppen/_themengruppe.html.erb b/app/views/themengruppen/_themengruppe.html.erb index 9fe5849..450e18e 100644 --- a/app/views/themengruppen/_themengruppe.html.erb +++ b/app/views/themengruppen/_themengruppe.html.erb @@ -1,8 +1,14 @@

<%= link_to themengruppe.title, themengruppe %>

- <%=themengruppe.text %> + <%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT + themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..." + else + themengruppe.text + end%>

+
+<%= I18n.t("themengruppe.themen") %>