Revision 918:04114f36670d vendor/plugins/redmine_bibliography/app/views/publications

View differences:

vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.erb
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3

  
4
<div id="authors" class="fields">
5
<!--  <h4><%= l("label_author_1") %></h4> -->
6

  
7
  <div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> >
8
      <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

  
14
      <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
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
27
      </p>
28
    </div>	
29
  
30
  <div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
31
    <p>
32
      <%= 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
    </p>
39
  </div>
40
  
41

  
42
  <div class="box" id="<%= form_tag_id( f.object_name, :show_author_info ) %>" style="display: none">
43
	
44
  </div>
45

  
46
  <p>
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
  <%- end -%>
53

  
54

  
55
  <%= link_to_remove_fields l("remove_author"), f %>
56
  </p>
57
</div>
58
<br/>
vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3

  
4
<div id="authors" class="fields">
5
<!--  <h4><%= l("label_author_1") %></h4> -->
6

  
7
  <div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> >
8
      <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

  
14
      <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
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
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 ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
27
      </p>
28
    </div>	
29
  
30
  <div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
31
    <p>
32
      <%= 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
    </p>
39
  </div>
40
  
41

  
42
  <div class="box" id="<%= form_tag_id( f.object_name, :show_author_info ) %>" style="display: none">
43
	
44
  </div>
45

  
46
  <p>
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
  <%- end -%>
53

  
54

  
55
  <%= link_to_remove_fields l("remove_author"), f %>
56
  </p>
57
</div>
58
<br/>
vendor/plugins/redmine_bibliography/app/views/publications/autocomplete_for_author.erb
1
<% if params[:q] && params[:q].length > 1 %>
2
	<%= choose_author_link @object_name, @results %>
3
<% end %>
4

  
vendor/plugins/redmine_bibliography/app/views/publications/autocomplete_for_author.html.erb
1
<% if params[:q] && params[:q].length > 1 %>
2
	<%= choose_author_link @object_name, @results %>
3
<% end %>
4

  
vendor/plugins/redmine_bibliography/app/views/publications/autocomplete_for_project.erb
1
<% if params[:q] && params[:q].length > 1 %>
2
	<%= projects_check_box_tags 'publication[project_ids][]', @projects %>
3
<% end %>
vendor/plugins/redmine_bibliography/app/views/publications/autocomplete_for_project.html.erb
1
<% if params[:q] && params[:q].length > 1 %>
2
	<%= projects_check_box_tags 'publication[project_ids][]', @projects %>
3
<% end %>

Also available in: Unified diff