To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / plugins / redmine_bibliography / app / views / publications / show.html.erb @ 1382:ac411172d897

History | View | Annotate | Download (2.93 KB)

1 1376:6ba24edae331 luis
<%= javascript_tag "$(document).ready(function(){
2

3
   $('#authorships').sortable({
4
       axis: 'y',
5
       dropOnEmpty: false,
6
       handle: '.handle',
7
       cursor: 'crosshair',
8
       items: 'li',
9
       opacity: 0.4,
10
       scroll: true,
11
       update: function(){
12
          $.ajax({
13
              type: 'post',
14
              data: $('#authorships').sortable('serialize'),
15
              dataType: 'script',
16
              complete: function(request){
17
                 $('#authorship').effect('highlight');
18
              },
19
                 url: '#{url_for(:controller => :authorships, :action => :sort)}'});
20
              }
21
          });
22
     });
23
" -%>
24 1364:4d5d25039a5f luis
25 545:a2c2b9f8380b luis
<h2><%=l(:label_publication_show)%></h2>
26 464:fbdfec975bfa luis
27 615:c4ddb9531f4c chris
<div class="box">
28 946:a0c9cc95bcf3 luis
  <h3>Publication Info</h3>
29 1068:e11d8d13ebc5 luis
  <p><%= print_ieee_format(@publication)%></p>
30 1059:5617e630bf26 luis
31 1037:d937100c4b4a chris
  <h3>B<small>IB</small>T<sub>E</sub>X Format</h3>
32 1068:e11d8d13ebc5 luis
  <pre><%=h print_bibtex_format(@publication) %></pre>
33 946:a0c9cc95bcf3 luis
</div>
34 945:75351d69e2ba luis
35 946:a0c9cc95bcf3 luis
<div class="box">
36 329:4575b631f6ce luis
37 471:49fb7a9ef79c luis
<h4><%= l(:authors) %></h4>
38 1317:2805873c0147 luis
39 471:49fb7a9ef79c luis
<ul id="authorships">
40 556:ca9e8e562ea7 luis
  <% for authorship in @publication.authorships.find(:all, :order => :auth_order) %>
41 1325:4ef7df804bab luis
    <%= content_tag_for :li, authorship do -%>
42 1059:5617e630bf26 luis
      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
43 629:f9470a59e5da luis
        <span class="handle">[drag to reorder]</span>
44
      <%- end -%>
45 1325:4ef7df804bab luis
46 1317:2805873c0147 luis
      <%= link_to_authorship authorship %> <em><%= h(authorship.institution) %></em>
47 1325:4ef7df804bab luis
48 1317:2805873c0147 luis
      <br />
49 629:f9470a59e5da luis
    <%- end -%>
50
  <%- end -%>
51 471:49fb7a9ef79c luis
</ul>
52 945:75351d69e2ba luis
53 445:77f88379115a luis
<%- if @publication.bibtex_entry != nil -%>
54 1323:e1899e896dbc luis
  <%= show_bibtex_fields(@publication.bibtex_entry).html_safe -%>
55 445:77f88379115a luis
<%- end -%>
56 425:4ecbc22579e2 luis
57 1059:5617e630bf26 luis
<%- unless @publication.external_url.blank? -%>
58 658:65749e700af0 luis
  <p>
59 1059:5617e630bf26 luis
    <b><%= l(:field_external_url) %>:</b> <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} -%>
60
  </p>
61
<%- end -%>
62
63
<% unless @publication.doi.blank? %>
64
  <p>
65
    <b><%= l(:field_doi)-%>:</b> <%= link_to h(@publication.doi), "http://dx.doi.org/#{@publication.doi}", {:target => "_blank"} -%>
66 658:65749e700af0 luis
  </p>
67
<% end %>
68
69 629:f9470a59e5da luis
<br / >
70 1059:5617e630bf26 luis
  <% if User.current.allowed_to?(:add_publication, @project) %>
71 626:e2663e0bd5a6 luis
    <%= link_to l(:label_publication_edit), { :controller => "publications", :action => "edit", :id => @publication, :project_id => @project } %> |
72
    <%= link_to "Delete", {:controller => 'publications', :action => 'destroy', :id => @publication, :project_id => @project },
73 560:735388da579a luis
                                                     :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> |
74 626:e2663e0bd5a6 luis
  <% end %>
75 639:cbad7075a60f luis
  <%= link_to l(:view_all_publications), {:controller => 'publications', :action => 'index', :project_id => @project } %>
76 464:fbdfec975bfa luis
</div>
77 452:34a6cf259682 luis
78 464:fbdfec975bfa luis
<% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %>
79 1059:5617e630bf26 luis
80 615:c4ddb9531f4c chris
<% content_for :sidebar do %>
81
  <h3><%=l(:label_publication_project_index)%></h3>
82 629:f9470a59e5da luis
83 464:fbdfec975bfa luis
  <p id="list_projects">
84
    <%= render :partial => 'list_projects' %>
85
  </p>
86 1059:5617e630bf26 luis
87 629:f9470a59e5da luis
  <%- if User.current.allowed_to?(:edit_publication, @project) -%>
88 1059:5617e630bf26 luis
    <%= render :partial => 'add_project_form' %>
89 629:f9470a59e5da luis
  <%- end -%>
90 615:c4ddb9531f4c chris
<% end %>