Mercurial > hg > soundsoftware-site
changeset 645:b83173d26d86 feature_36
Further layout improvements to bibliography on project home page
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 09 Sep 2011 11:48:39 +0100 |
parents | 999a6b3c4cd1 |
children | e01aa4ccc0a2 |
files | vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css vendor/plugins/redmine_bibliography/config/locales/en.yml |
diffstat | 3 files changed, 37 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Fri Sep 09 11:13:14 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Fri Sep 09 11:48:39 2011 +0100 @@ -1,11 +1,26 @@ +<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> <% if @project.publications.any? %> - <div class="bibliography box"> - <h3><%=l(:label_related_publication_plural)%></h3> - <p><% @project.publications.each do |publication| %> - <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %> - - <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %> - <% if publication.bibtex_entry.year.to_s != "" %>(<%= publication.bibtex_entry.year %>)<% end %> - <br /> - <% end %></p> + <div id="bibliography"> + <div class="box"> + <h3><%=l(:label_related_publication_plural)%></h3> + + <dl> + <% @project.publications.each do |publication| %> + <dt> + <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %> + </dt> + <dd> + <span class="authors"> + <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %> + </span> + <% if publication.bibtex_entry.year.to_s != "" %> + <span class="year"> + <%= publication.bibtex_entry.year %> + </span> + <% end %> + </dd> + <% end -%> + </dl> </div> +</div> <% end %>
--- a/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Fri Sep 09 11:13:14 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Fri Sep 09 11:48:39 2011 +0100 @@ -27,3 +27,15 @@ .publication_project { margin-right: 18px; } + +div#bibliography dl { margin-left: 2em; } +div#bibliography .box dl { margin-left: 0; } +div#bibliography dt { margin-bottom: 0px; padding-left: 20px } +div#bibliography .box dt { margin-bottom: 0px; padding-left: 10px } +div#bibliography dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; } +div#bibliography .box dd { margin-bottom: 0.6em; padding-left: 0; } +div#bibliography dd .authors { font-style: italic; } +div#bibliography dd span.authors { color: #808080; } +div#bibliography dd span.year { padding-left: 0.6em; } + +div#bibliography h3 { background: url(../../../images/table_multiple.png) no-repeat 0% 50%; padding-left: 20px; }
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 09 11:13:14 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 09 11:48:39 2011 +0100 @@ -26,10 +26,10 @@ field_publication_title: Title field_publication_authors: Authors - field_publication_projects: "Associated Projects" + field_publication_projects: "Associated projects" field_author_name: Author field_author_user: User Name - field_author_username: "Associated User" + field_author_username: "Associated user" field_author_publications: "Publications by this Author" field_identify_author_yes: "Yes" field_identify_author_correct: "Corrections"