Ahora sólo se muestra el primer párrafo de la definición de cada término del glosario en la vista de tabla
This commit is contained in:
parent
4ebcf2c462
commit
d491f8c5fc
4 changed files with 8 additions and 10 deletions
|
@ -11,13 +11,13 @@
|
|||
<tbody>
|
||||
<% for term in index_in_category -%>
|
||||
<tr class="<%= cycle("odd", "even") %> term">
|
||||
<td><%=h term.id %></td>
|
||||
<td><%=h term.id %></td>
|
||||
<td><%= term_link(term) %></td>
|
||||
<% for prm in @show_params %>
|
||||
<td><%=h term.value(prm) %></td>
|
||||
<% end %>
|
||||
<!--td><%=h truncate(term.description, :length=>50) %></td-->
|
||||
<td><%=textilizable term.description %></td>
|
||||
<td><% @paragraphs = Nokogiri::HTML.parse(term.description).css('p') %><%=textilizable @paragraphs.first.inner_html + (@paragraphs.size > 1 ? '<p>…</p>' : '') %></td>
|
||||
<td align="right" width="40px">
|
||||
<% if term.project_id == @project.id %>
|
||||
<%= link_to_if_authorized(image_tag('edit.png'), {:action => 'edit', :project_id => @project, :id => term}, :title => l(:button_edit)) %>
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
|
||||
<% term = show_one %>
|
||||
<% if !@show_params.empty? %>
|
||||
<% if @show_params.size > 1 %>
|
||||
<table class="term_items">
|
||||
<% for prm in @show_params %>
|
||||
<tr><th><%=h label_param(prm) %>:</th><td><%= term.value(prm) %></td></tr>
|
||||
<% unless term.value(prm).blank? %><tr><th><%=h label_param(prm) %>:</th><td><%= term.value(prm) %></td></tr><% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
<% unless (term.description.empty?) %>
|
||||
<% if !@show_params.empty? %>
|
||||
<strong><%=l(:field_description)%></strong>:
|
||||
<% end %>
|
||||
<% if @show_params.size > 1 %><strong><%= l(:field_description) %></strong>:<% end %>
|
||||
<div class="wiki">
|
||||
<%= textilizable term, :description, :attachments => term.attachments %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue