Revision 1026:b42553f6df71 vendor/plugins/redmine_bibliography/app
| vendor/plugins/redmine_bibliography/app/models/publication.rb | ||
|---|---|---|
| 82 | 82 |
end |
| 83 | 83 |
|
| 84 | 84 |
if style == :ieee |
| 85 |
CiteProc.process bib.to_citeproc, :style => :ieee, :format => :html |
|
| 86 |
else |
|
| 87 |
bib.to_s :include => :meta_content |
|
| 85 |
CiteProc.process bib.to_citeproc, :style => :ieee, :format => :html |
|
| 86 |
else |
|
| 87 |
bibtex = bib.to_s :include => :meta_content |
|
| 88 |
bibtex.strip! |
|
| 89 |
logger.error { bibtex }
|
|
| 88 | 90 |
end |
| 89 | 91 |
end |
| 90 | 92 |
end |
| 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 |
(<%= 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 readonly><%= publication.print_entry(:bibtex) -%></textarea>
|
|
| 24 |
</dd>
|
|
| 20 | 25 |
<% end -%> |
| 21 |
</dl> |
|
| 26 |
</dl>
|
|
| 22 | 27 |
</div> |
| 23 | 28 |
</div> |
| 24 |
<% end %> |
|
| 29 |
<% end -%> |
|
| vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb | ||
|---|---|---|
| 4 | 4 |
|
| 5 | 5 |
<div class="box"> |
| 6 | 6 |
<h3>Publication Info</h3> |
| 7 |
<%=h show_cite_proc_entry(@publication)%> |
|
| 8 |
|
|
| 9 |
<br /> |
|
| 10 |
<br /> |
|
| 11 |
<h4>Bibtex Code</h4> |
|
| 12 |
<%= text_area_tag :bibtex_code, h(print_bibtex_entry(@publication)), :readonly => true, :rows => 6, :style => 'width:90%' %> |
|
| 13 |
|
|
| 7 |
<%= show_cite_proc_entry(@publication)%> |
|
| 8 |
|
|
| 9 |
<h3>Bibtex Format</h3> |
|
| 10 |
<%=h print_bibtex_entry(@publication) %> |
|
| 14 | 11 |
</div> |
| 15 | 12 |
|
| 16 | 13 |
<div class="box"> |
| ... | ... | |
| 31 | 28 |
<%= sortable_element("authorships", :url => { :controller => :publications, :action => :sort_author_order }, :handle => "handle") %>
|
| 32 | 29 |
<%- end -%> |
| 33 | 30 |
|
| 31 |
<%- if @publication.bibtex_entry != nil -%> |
|
| 32 |
<%= show_bibtex_fields(@publication.bibtex_entry) %> |
|
| 33 |
<%- end -%> |
|
| 34 |
|
|
| 34 | 35 |
<% unless @publication.external_url.blank? %> |
| 35 | 36 |
<h4> |
| 36 | 37 |
<%= l(:field_external_url) %> |
Also available in: Unified diff