CHANGE: Beschreibungstext wird abgeschnitten auf Themengruppe::WORD_COUNT sowie
locales für Thema
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
|
||||
<h3> <%= link_to themengruppe.title, themengruppe %> </h3>
|
||||
<p>
|
||||
<%=themengruppe.text %>
|
||||
<%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT
|
||||
themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..."
|
||||
else
|
||||
themengruppe.text
|
||||
end%>
|
||||
</p>
|
||||
<br/>
|
||||
<b><%= I18n.t("themengruppe.themen") %></b>
|
||||
<ul>
|
||||
<% themengruppe.themen.each do |t| %>
|
||||
<li>
|
||||
|
||||
@@ -123,3 +123,5 @@ de:
|
||||
support:
|
||||
array:
|
||||
two_words_connector: ', '
|
||||
themengruppe:
|
||||
themen: "Themen"
|
||||
|
||||
Reference in New Issue
Block a user