Revision 1017:63f8c4f2cf67 vendor/plugins

View differences:

vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb
1
<% content_for :header_tags do %>
2
    <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
3
    <%= javascript_include_tag 'bibtex', :plugin => 'redmine_bibliography' -%>
4
<% end %>
5

  
1 6
<% if @project.publications.any? %>
2 7
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
3 8
  <div id="bibliography">
4 9
    <div class="box">
5 10
    <h3><%=l(:label_related_publication_plural)%></h3>
6 11

  
7
   <dl>
8
     <% @project.publications.each do |publication| %>
9
     <dt>
10
     <span class="authors">
11
       <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
12
     </span>
13
     <span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %></span>
14
     <% if publication.bibtex_entry.year.to_s != "" %>
15
     <span class="year">
16
       &nbsp;(<%= publication.bibtex_entry.year %>)
17
     </span>
18
     <% end %>
19
     </dt><dd></dd>
12
     <dl>       
13
     <% @project.publications.each do |publication| %>       
14
       <dt>
15
          <%= publication.print_entry(:ieee) -%>
16
       </dt>
17
       <dd>
18
         <%= link_to("[More Details]", {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%> 
19
         
20
         <%= link_to_function "[Bibtex]", onclick="toggleBibtex(this)" -%> 
21
       </dd>
22
       <dd class="bibtex-textarea collapsed" style="display: none;">
23
         <textarea> 
24
           <%= publication.print_entry(:bibtex) -%>         
25
         </textarea>         
26
       </dd>
20 27
   <% end -%>
21
   </dl>
28
     </dl>
22 29
  </div>
23 30
</div>
24
<% end %>
31
<% end -%>
vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3 1
<h2><%=l(:label_publication_show)%></h2>
4 2

  
5 3
<div class="box">
6 4
  <h3>Publication Info</h3>
7
  <%=h show_cite_proc_entry(@publication)%>
5
  <%= show_cite_proc_entry(@publication)%>
8 6
  
9 7
  <h3>Bibtex Format</h3>
10 8
    <%=h print_bibtex_entry(@publication) %>
vendor/plugins/redmine_bibliography/assets/javascripts/bibtex.js
1
function toggleBibtex(el) {
2
  var dd = Element.up(el).next('dd')
3

  
4
  dd.toggleClassName('collapsed');
5
  Effect.toggle(dd, 'slide', {duration:0.2});
6
}
vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css
32 32
    min-width: 150px;
33 33
}
34 34

  
35
div#bibliography dl { margin-left: 2em; }
36
div#bibliography .box dl { margin-left: 0; }
37
div#bibliography dt { margin-bottom: 0px; padding-left: 20px }
38
div#bibliography .box dt { margin-bottom: 0px; padding-left: 10px }
35

  
39 36
div#bibliography dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
40
div#bibliography .box dd { margin-bottom: 0.6em; padding-left: 0; }
37

  
41 38
div#bibliography dd .authors { font-style: italic; }
42
div#bibliography dt .title { font-style: italic; }
43 39
div#bibliography dd span.authors { color: #808080; }
44 40
div#bibliography dd span.year { padding-left: 0.6em; }
45 41

  
42
div#bibliography .box dt { 
43
  background: url(../../../images/document.png) no-repeat 0% 50%; padding-left: 20px;
44
  margin-left: 2em;
45
}
46
div#bibliography .box dd { 
47
  margin-left: 25px;
48
}
49

  
50

  
46 51
div#bibliography h3 { background: url(../../../images/table_multiple.png) no-repeat 0% 50%; padding-left: 20px; }

Also available in: Unified diff