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
|
class Themengruppe < ActiveRecord::Base
|
||||||
|
WORD_COUNT = 50
|
||||||
attr_accessible :text, :title
|
attr_accessible :text, :title
|
||||||
has_many :themen, class_name: 'Thema'
|
has_many :themen, class_name: 'Thema'
|
||||||
has_many :fragen, through: :themen
|
has_many :fragen, through: :themen
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
|
|
||||||
<h3> <%= link_to themengruppe.title, themengruppe %> </h3>
|
<h3> <%= link_to themengruppe.title, themengruppe %> </h3>
|
||||||
<p>
|
<p>
|
||||||
<%=themengruppe.text %>
|
<%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT
|
||||||
|
themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..."
|
||||||
|
else
|
||||||
|
themengruppe.text
|
||||||
|
end%>
|
||||||
</p>
|
</p>
|
||||||
|
<br/>
|
||||||
|
<b><%= I18n.t("themengruppe.themen") %></b>
|
||||||
<ul>
|
<ul>
|
||||||
<% themengruppe.themen.each do |t| %>
|
<% themengruppe.themen.each do |t| %>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -122,4 +122,6 @@ de:
|
|||||||
keine: "Keine Fehlermeldungen oder Warnungen"
|
keine: "Keine Fehlermeldungen oder Warnungen"
|
||||||
support:
|
support:
|
||||||
array:
|
array:
|
||||||
two_words_connector: ', '
|
two_words_connector: ', '
|
||||||
|
themengruppe:
|
||||||
|
themen: "Themen"
|
||||||
|
|||||||
Reference in New Issue
Block a user