From d491f8c5fc451e465d17fb685466fc4314d2e3e4 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Wed, 30 Jan 2019 18:39:57 +0100 Subject: [PATCH] =?UTF-8?q?Ahora=20s=C3=B3lo=20se=20muestra=20el=20primer?= =?UTF-8?q?=20p=C3=A1rrafo=20de=20la=20definici=C3=B3n=20de=20cada=20t?= =?UTF-8?q?=C3=A9rmino=20del=20glosario=20en=20la=20vista=20de=20tabla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/views/glossary/_index_in_category.html.erb | 4 ++-- .../app/views/glossary/_show_one.html.erb | 8 +++----- plugins/redmine_glossary/config/locales/es.yml | 2 +- public/themes/circlepro/stylesheets/application.css | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/redmine_glossary/app/views/glossary/_index_in_category.html.erb b/plugins/redmine_glossary/app/views/glossary/_index_in_category.html.erb index b4defe8..f57bde3 100755 --- a/plugins/redmine_glossary/app/views/glossary/_index_in_category.html.erb +++ b/plugins/redmine_glossary/app/views/glossary/_index_in_category.html.erb @@ -11,13 +11,13 @@ <% for term in index_in_category -%> term"> -<%=h term.id %> +<%=h term.id %> <%= term_link(term) %> <% for prm in @show_params %> <%=h term.value(prm) %> <% end %> -<%=textilizable term.description %> +<% @paragraphs = Nokogiri::HTML.parse(term.description).css('p') %><%=textilizable @paragraphs.first.inner_html + (@paragraphs.size > 1 ? '

' : '') %> <% 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)) %> diff --git a/plugins/redmine_glossary/app/views/glossary/_show_one.html.erb b/plugins/redmine_glossary/app/views/glossary/_show_one.html.erb index 22ad993..2caa03f 100755 --- a/plugins/redmine_glossary/app/views/glossary/_show_one.html.erb +++ b/plugins/redmine_glossary/app/views/glossary/_show_one.html.erb @@ -1,16 +1,14 @@ <% term = show_one %> -<% if !@show_params.empty? %> +<% if @show_params.size > 1 %> <% for prm in @show_params %> - +<% unless term.value(prm).blank? %><% end %> <% end %>
<%=h label_param(prm) %>:<%= term.value(prm) %>
<%=h label_param(prm) %>:<%= term.value(prm) %>
<% end %> <% unless (term.description.empty?) %> -<% if !@show_params.empty? %> -<%=l(:field_description)%>: -<% end %> +<% if @show_params.size > 1 %><%= l(:field_description) %>:<% end %>
<%= textilizable term, :description, :attachments => term.attachments %>
diff --git a/plugins/redmine_glossary/config/locales/es.yml b/plugins/redmine_glossary/config/locales/es.yml index 46bb823..331225e 100755 --- a/plugins/redmine_glossary/config/locales/es.yml +++ b/plugins/redmine_glossary/config/locales/es.yml @@ -9,7 +9,7 @@ es: label: id: No. name: Término - name_en: Inglés + name_en: En inglés category: Categoría datatype: "Tipo de dato en código" codename: "Abreviatura en código" diff --git a/public/themes/circlepro/stylesheets/application.css b/public/themes/circlepro/stylesheets/application.css index 91d7d6e..f868e12 100644 --- a/public/themes/circlepro/stylesheets/application.css +++ b/public/themes/circlepro/stylesheets/application.css @@ -1502,10 +1502,10 @@ table.term_items tr th { #glossary_style_project_scope { margin-left: 1em; } -.edit_glossary_style #grouping { +form[class$="glossary_style"] #grouping { margin-top: 4px; } -.edit_glossary_style #grouping label { +form[class$="glossary_style"] #grouping label { display: block; text-transform: capitalize; }