This commit is contained in:
Thomas Blazek
2013-08-19 20:57:48 +02:00
7 changed files with 30 additions and 19 deletions

View File

@@ -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%
}

View File

@@ -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

View File

@@ -1,2 +1,2 @@
<%= link_to thema.title,themengruppe_thema_path(thema.themengruppe,thema)%>
<%= thema.title%>

View File

@@ -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>

View File

@@ -1,24 +1,26 @@
<div class="container-fluid">
<% @themengruppen.each_slice(2) do |row| %>
<% @themengruppen.each_slice(2) do |row| %>
<div class="row-fluid">
<% row.each do |themengruppe| %>
<div class="span6 equalheight">
<div class="themengruppe">
<%= render themengruppe %>
<p>
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
</p>
</div>
</div>
<% end %>
<div class="span6 equalheight">
<div class="themengruppe">
<%= render themengruppe %>
<p>
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
</p>
</div>
</div>
<% end %>
</div>
<% end %>
<% end %>
</div>
<br />
<script>
make_equal_height();
<script class="hidden-phone">
<!-- make_equal_height();
-->
</script>
<%= link_to 'New Themengruppe', new_themengruppe_path %>

View File

@@ -14,7 +14,7 @@
</div>
<div id="collapse<%=thema.id%>" class="accordion-body collapse">
<div class="accordion-inner">
<%= render partial: "themen/small", object: thema %>
<%= render :partial => 'themen/small', :object => thema %>
</div>
</div>
</div>

View File

@@ -123,4 +123,6 @@ de:
keine: "Keine Fehlermeldungen oder Warnungen"
support:
array:
two_words_connector: ', '
two_words_connector: ', '
themengruppe:
themen: "Themen"