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.html.erb @ 1051:ef882e222003

History | View | Annotate | Download (3.6 KB)

1
<fieldset> 
2
  <div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> >
3
      <p>
4
        <%= f.text_field :search_name, :size => 25 %>
5
        <%= 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' ) %>
6
      </p>
7
      <%# link_to_function l(:label_author_is_me), "update_author_info(this," + User.current.get_author_info.to_json + ")", :id => "add_me_as_author" %>
8

    
9
      <p>   
10
        <%= f.select :search_results, options_for_select(@author_options), {}, {:size => 5, 
11
          :onChange => remote_function( :url => { :controller => :publications, :action => :get_user_info, :object_id => form_object_id(f.object_name) }, :with => "'value=' + 
12
          value" )} %>
13
            </p>  
14

    
15
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
16
      <p class="author_identify">
17
        <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 />
18
       
19
        <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 />
20
        
21
        <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 />
22
      </p>
23
  </div>        
24
  
25
  <div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
26
    <p>
27
      <%= f.text_field :name_on_paper, {:class => ("readonly" unless params[:action] == "new") } %></p>
28
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_name_on_paper") %></p>
29
      <p><%= f.text_field :institution, {:class => ("readonly" unless params[:action] == "new") }  %></p>
30
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_institution") %></p>
31
      <p><%= f.text_field :email, {:class => ("readonly" unless params[:action] == "new") }  %></p>
32
      <p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_email") %></p>
33
    </p>
34
  </div>
35
  
36
  <div class="box" id="<%= form_tag_id( f.object_name, :show_author_info ) %>" style="display: none">
37
  </div>
38
  
39
  <p>
40
    <%- if params[:action] == 'new' -%>
41
      <%= 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 )} %>
42
    <%- else -%>
43
      <%= 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 )} %>
44
    <%- end -%>
45

    
46
  <%= link_to_remove_fields l("remove_author"), f %>
47
  </p>
48
<br />
49
</fieldset>
50