Revision 1317:2805873c0147 plugins/redmine_bibliography/app/views/publications

View differences:

plugins/redmine_bibliography/app/views/publications/_add_project_form.html.erb
1
<% form_remote_for(:publication, 
2
                     :url => {:controller => 'publications', :action => 'add_project', :id => @publication, :project_id => @project}, 
3
                     :method => :post,
4
                     :html => { :id => 'add_project_form' }, 
5
									   :loading => "$('project-add-submit').disable()",
6
									   :complete => "$('project-add-submit').enable()") do |f| %>
7
								<fieldset><legend><%=l(:label_add_project_to_publication)%></legend>
8
	      <p>
9
	        <%= label_tag "project_search", l(:label_project_search) %><%= text_field_tag 'project_search', nil %>
10
	      </p>
1
<%= form_for(:publication, 
2
            :remote => true, 
3
            :url => {:controller => 'publications', :action => 'add_project', :id => @publication, :project_id => @project}, 
4
            :method => :post,
5
            :html => { :id => 'add_project_form' }, 
6
            :loading => "$('project-add-submit').disable()",
7
            :complete => "$('project-add-submit').enable()") do |f| %>
8
						
9
              <fieldset><legend><%=l(:label_add_project_to_publication)%></legend>
10
                <p>
11
                  <%= label_tag "project_search", l(:label_project_search) %><%= text_field_tag 'project_search', nil %>
12
	              </p>
11 13
	     
12
	      <%= observe_field(:project_search,
13
               :frequency => 0.5,
14
               :update => :projects,
15
               :url => { :controller => 'publications', :action => 'autocomplete_for_project', :id => @publication },
16
               :with => 'q')
17
                %>
14
                 observe_field(:project_search,
15
                 :frequency => 0.5,
16
                 :update => :projects,
17
                 :url => { :controller => 'publications', :action => 'autocomplete_for_project', :id => @publication },
18
                 :with => 'q')
19
                
18 20

  
19
					<div id="projects">
20
					<% if params[:q] && params[:q].length > 1 %>
21
			  		  <%= projects_check_box_tags 'project[project_ids][]', @projects %>
22
					<% end %>
23
					</div>
21
                <div id="projects">                  
22
                  <% if params[:q] && params[:q].length > 1 %>
23
                    <%= projects_check_box_tags 'project[project_ids][]', @projects %>
24
                  <% end %>
25
                </div>
24 26

  
25
        <p><%= submit_tag l(:button_add), :id => 'project-add-submit' %></p>
26
    
27
    
28
      </fieldset>
27
                <p><%= submit_tag l(:button_add), :id => 'project-add-submit' %></p>    
28
              </fieldset>
29 29
  <% end %>
plugins/redmine_bibliography/app/views/publications/show.html.erb
11 11
<div class="box">
12 12

  
13 13
<h4><%= l(:authors) %></h4>
14

  
14 15
<ul id="authorships">
15 16
  <% for authorship in @publication.authorships.find(:all, :order => :auth_order) %>
16 17
    <% content_tag_for :li, authorship do %>
17 18
      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
18 19
        <span class="handle">[drag to reorder]</span>
19 20
      <%- end -%>
20
      <%= link_to_authorship authorship %> <em><%= h authorship.institution %></em> <br />
21
      
22
      <%= link_to_authorship authorship %> <em><%= h(authorship.institution) %></em>
23
      
24
      <br />
21 25
    <%- end -%>
22 26
  <%- end -%>
23 27
</ul>
24 28

  
25
<%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
26
  <%= sortable_element("authorships", :url => { :controller => :publications, :action => :sort_author_order }, :handle => "handle") %>
27
<%- end -%>
28

  
29 29
<%- if @publication.bibtex_entry != nil -%>
30 30
  <%= show_bibtex_fields(@publication.bibtex_entry) %>
31 31
<%- end -%>
......
36 36
  </p>
37 37
<%- end -%>
38 38

  
39

  
40 39
<% unless @publication.doi.blank? %>
41 40
  <p>
42 41
    <b><%= l(:field_doi)-%>:</b> <%= link_to h(@publication.doi), "http://dx.doi.org/#{@publication.doi}", {:target => "_blank"} -%>

Also available in: Unified diff