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 / vendor / plugins / redmine_bibliography / app / views / publications / _authorship_fields.rhtml @ 715:3c1257f96b79

History | View | Annotate | Download (3.78 KB)

1 603:7b39f35803f3 luis
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2
3
4 481:dd242ea99fd3 luis
<div id="authors" class="fields">
5 655:70c163e49aea chris
<!--  <h4><%= l("label_author_1") %></h4> -->
6 573:aed210f6095b chris
7 609:3221b2ab7804 luis
  <div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> >
8 601:1608b3cb50cd luis
      <p>
9
        <%= f.text_field :search_name, :size => 25 %>
10
        <%= observe_field( form_tag_id(f.object_name, :search_name), :frequency => 0.5, :update => form_tag_id( f.object_name, :search_results), :url => { :controller => 'publications', :action => 'autocomplete_for_author', :object_name => form_object_id(f.object_name)  },  :with => 'q' ) %>
11
      </p>
12
      <%# link_to_function l(:label_author_is_me), "update_author_info(this," + User.current.get_author_info.to_json + ")", :id => "add_me_as_author" %>
13 573:aed210f6095b chris
14 615:c4ddb9531f4c chris
      <p>
15
      <%= f.select :search_results, options_for_select(@author_options), {}, {:size => 5,
16
        :onChange => remote_function( :url => { :controller => :publications, :action => :get_user_info, :object_id => form_object_id(f.object_name) }, :with => "'value=' +
17
        value" )} %>
18
        </p>
19
20 619:4ede44d53f76 chris
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
21 623:a434a588f16c chris
      <p class="author_identify">
22 707:065041087084 luis
        <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 619:4ede44d53f76 chris
24 707:065041087084 luis
        <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 618:18e0709fd0d9 luis
26 707:065041087084 luis
        <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 597:70f0276fde9a luis
      </p>
28 601:1608b3cb50cd luis
    </div>
29 609:3221b2ab7804 luis
30 623:a434a588f16c chris
  <div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
31 609:3221b2ab7804 luis
    <p>
32 623:a434a588f16c chris
      <%= f.text_field :name_on_paper, {:class => ("readonly" unless params[:action] == "new") } %></p>
33
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_name_on_paper") %></p>
34
      <p><%= f.text_field :institution, {:class => ("readonly" unless params[:action] == "new") }  %></p>
35
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_institution") %></p>
36
      <p><%= f.text_field :email, {:class => ("readonly" unless params[:action] == "new") }  %></p>
37
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_email") %></p>
38 609:3221b2ab7804 luis
    </p>
39 601:1608b3cb50cd luis
  </div>
40
41 603:7b39f35803f3 luis
42
  <div class="box" id="<%= form_tag_id( f.object_name, :show_author_info ) %>" style="display: none">
43
44
  </div>
45
46 623:a434a588f16c chris
  <p>
47 660:e40cd3570ebc luis
48 705:b6f9f005c0b6 luis
  <%- if params[:action] == 'new' -%>
49 710:7db874627e11 luis
    <%= 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 ), :class => 'edit-save-button' } %>
50 705:b6f9f005c0b6 luis
  <%- else -%>
51 715:3c1257f96b79 luis
    <%= 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 ), :class => 'edit-save-button' } %>
52 705:b6f9f005c0b6 luis
  <%- end -%>
53 660:e40cd3570ebc luis
54 603:7b39f35803f3 luis
55 601:1608b3cb50cd luis
  <%= link_to_remove_fields l("remove_author"), f %>
56 623:a434a588f16c chris
  </p>
57 605:8fc59e8ddd63 luis
</div>
58 619:4ede44d53f76 chris
<br/>