To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / plugins / redmine_bibliography / app / views / publications / show.html.erb @ 1390:ac480b6a13cf
History | View | Annotate | Download (2.93 KB)
| 1 |
<%= 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 |
|
| 25 |
<h2><%=l(:label_publication_show)%></h2> |
| 26 |
|
| 27 |
<div class="box"> |
| 28 |
<h3>Publication Info</h3> |
| 29 |
<p><%= print_ieee_format(@publication)%></p> |
| 30 |
|
| 31 |
<h3>B<small>IB</small>T<sub>E</sub>X Format</h3> |
| 32 |
<pre><%=h print_bibtex_format(@publication) %></pre> |
| 33 |
</div>
|
| 34 |
|
| 35 |
<div class="box"> |
| 36 |
|
| 37 |
<h4><%= l(:authors) %></h4> |
| 38 |
|
| 39 |
<ul id="authorships"> |
| 40 |
<% for authorship in @publication.authorships.find(:all, :order => :auth_order) %>
|
| 41 |
<%= content_tag_for :li, authorship do -%>
|
| 42 |
<%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
|
| 43 |
<span class="handle">[drag to reorder]</span> |
| 44 |
<%- end -%>
|
| 45 |
|
| 46 |
<%= link_to_authorship authorship %> <em><%= h(authorship.institution) %></em> |
| 47 |
|
| 48 |
<br /> |
| 49 |
<%- end -%>
|
| 50 |
<%- end -%>
|
| 51 |
</ul>
|
| 52 |
|
| 53 |
<%- if @publication.bibtex_entry != nil -%>
|
| 54 |
<%= show_bibtex_fields(@publication.bibtex_entry).html_safe -%>
|
| 55 |
<%- end -%>
|
| 56 |
|
| 57 |
<%- unless @publication.external_url.blank? -%>
|
| 58 |
<p>
|
| 59 |
<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 |
</p>
|
| 67 |
<% end %>
|
| 68 |
|
| 69 |
<br / > |
| 70 |
<% if User.current.allowed_to?(:add_publication, @project) %>
|
| 71 |
<%= 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 |
:confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> |
|
| 74 |
<% end %>
|
| 75 |
<%= link_to l(:view_all_publications), {:controller => 'publications', :action => 'index', :project_id => @project } %>
|
| 76 |
</div>
|
| 77 |
|
| 78 |
<% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %>
|
| 79 |
|
| 80 |
<% content_for :sidebar do %>
|
| 81 |
<h3><%=l(:label_publication_project_index)%></h3> |
| 82 |
|
| 83 |
<p id="list_projects"> |
| 84 |
<%= render :partial => 'list_projects' %>
|
| 85 |
</p>
|
| 86 |
|
| 87 |
<%- if User.current.allowed_to?(:edit_publication, @project) -%>
|
| 88 |
<%= render :partial => 'add_project_form' %>
|
| 89 |
<%- end -%>
|
| 90 |
<% end %>
|