Revision 787:a36cce722860 vendor/plugins/redmine_bibliography/app/views

View differences:

vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb
7 7
   <dl>
8 8
     <% @project.publications.each do |publication| %>
9 9
     <dt>
10
       <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %>
11
     </dt>
12
     <dd>
13 10
     <span class="authors">
14
       <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
11
       <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
15 12
     </span>
13
     <span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %></span>
16 14
     <% if publication.bibtex_entry.year.to_s != "" %>
17 15
     <span class="year">
18
       <%= publication.bibtex_entry.year %>
16
       &nbsp;(<%= publication.bibtex_entry.year %>)
19 17
     </span>
20 18
     <% end %>
21
     </dd>
19
     </dt><dd></dd>
22 20
   <% end -%>
23 21
   </dl>
24 22
  </div>
vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml
19 19

  
20 20
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
21 21
      <p class="author_identify">
22
        <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
22
        <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
23 23
       
24
        <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
24
        <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
25 25
        
26
        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
26
        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
27 27
      </p>
28 28
    </div>	
29 29
  
......
45 45

  
46 46
  <p>
47 47

  
48
  <% if params[:action] == 'new' %>
49
   <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
50
  <% else %>
51
<%= button_to_function l(:label_edit_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
52

  
53
 <% end %>
48
  <%- if params[:action] == 'new' -%>
49
    <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
50
  <%- else -%>
51
    <%= button_to_function l(:label_edit_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
52
  <%- end -%>
54 53

  
55 54

  
56 55
  <%= link_to_remove_fields l("remove_author"), f %>
vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb
24 24
    <% f.fields_for :authorships do |builder| -%>
25 25
      <%= render "authorship_fields", :f => builder %>
26 26
    <%- end -%>
27
    <%= link_to_add_fields l(:label_add_an_author), f, :authorships %>
27
    <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
28 28
  </div>
29 29
</div>
30 30

  
vendor/plugins/redmine_bibliography/app/views/users/show.rhtml
51 51

  
52 52
    <% @publications.each do |publication|%>    
53 53
      <dt>
54
        <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %>
55
      </dt>
56

  
57
      <dd>
58 54
        <span class="authors">
59
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
55
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
60 56
        </span>
57
        <span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %></span>
61 58
        <% if publication.bibtex_entry.year.to_s != "" %>
62 59
          <span class="year">
63
            <%= publication.bibtex_entry.year %>
60
            &nbsp;(<%= publication.bibtex_entry.year %>)
64 61
          </span>
65 62
        <% end %>
63
      </dt>
64
      <dd>
66 65
      </dd>
67 66
  	<% end %>
68 67
  </div>

Also available in: Unified diff