# HG changeset patch # User luisf # Date 1352751395 0 # Node ID 63f8c4f2cf673bbdce37223f98756d992db21495 # Parent be5cf488993e68c382d18338a984acc451be2708 Shows the publication list as IEEE formatted entries; Adds 2 links, one for the publication details and another for to show the publication details as bibtex. diff -r be5cf488993e -r 63f8c4f2cf67 vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Mon Nov 12 20:12:58 2012 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Mon Nov 12 20:16:35 2012 +0000 @@ -1,24 +1,31 @@ +<% content_for :header_tags do %> + <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> + <%= javascript_include_tag 'bibtex', :plugin => 'redmine_bibliography' -%> +<% end %> + <% if @project.publications.any? %> <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>

<%=l(:label_related_publication_plural)%>

-
- <% @project.publications.each do |publication| %> -
- - <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %> - - <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %> - <% if publication.bibtex_entry.year.to_s != "" %> - -  (<%= publication.bibtex_entry.year %>) - - <% end %> -
+
+ <% @project.publications.each do |publication| %> +
+ <%= publication.print_entry(:ieee) -%> +
+
+ <%= link_to("[More Details]", {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%> + + <%= link_to_function "[Bibtex]", onclick="toggleBibtex(this)" -%> +
+ <% end -%> -
+
-<% end %> +<% end -%> diff -r be5cf488993e -r 63f8c4f2cf67 vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Mon Nov 12 20:12:58 2012 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Mon Nov 12 20:16:35 2012 +0000 @@ -1,10 +1,8 @@ -<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> -

<%=l(:label_publication_show)%>

Publication Info

- <%=h show_cite_proc_entry(@publication)%> + <%= show_cite_proc_entry(@publication)%>

Bibtex Format

<%=h print_bibtex_entry(@publication) %> diff -r be5cf488993e -r 63f8c4f2cf67 vendor/plugins/redmine_bibliography/assets/javascripts/bibtex.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_bibliography/assets/javascripts/bibtex.js Mon Nov 12 20:16:35 2012 +0000 @@ -0,0 +1,6 @@ +function toggleBibtex(el) { + var dd = Element.up(el).next('dd') + + dd.toggleClassName('collapsed'); + Effect.toggle(dd, 'slide', {duration:0.2}); +} \ No newline at end of file diff -r be5cf488993e -r 63f8c4f2cf67 vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css --- a/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Mon Nov 12 20:12:58 2012 +0000 +++ b/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Mon Nov 12 20:16:35 2012 +0000 @@ -32,15 +32,20 @@ min-width: 150px; } -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 dt .title { font-style: italic; } div#bibliography dd span.authors { color: #808080; } div#bibliography dd span.year { padding-left: 0.6em; } +div#bibliography .box dt { + background: url(../../../images/document.png) no-repeat 0% 50%; padding-left: 20px; + margin-left: 2em; +} +div#bibliography .box dd { + margin-left: 25px; +} + + div#bibliography h3 { background: url(../../../images/table_multiple.png) no-repeat 0% 50%; padding-left: 20px; }