Revision 952:12f729c9f47d vendor/plugins/redmine_bibliography/app/views/publications

View differences:

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

  
3
<fieldset>
1
<fieldset> 
4 2
  <div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> >
5 3
      <p>
6 4
        <%= f.text_field :search_name, :size => 25 %>
......
9 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" %>
10 8

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

  
17 15
      <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
18 16
      <p class="author_identify">
......
22 20
        
23 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 />
24 22
      </p>
25
    </div>	
23
  </div>	
26 24
  
27 25
  <div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
28 26
    <p>
......
35 33
    </p>
36 34
  </div>
37 35
  
38

  
39 36
  <div class="box" id="<%= form_tag_id( f.object_name, :show_author_info ) %>" style="display: none">
40
	
41 37
  </div>
38
  
42 39
  <p>
43

  
44
  <%- if params[:action] == 'new' -%>
45
    <%= 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 )} %>
46
  <%- else -%>
47
    <%= 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 )} %>
48
  <%- end -%>
49

  
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 -%>
50 45

  
51 46
  <%= link_to_remove_fields l("remove_author"), f %>
52 47
  </p>
48

  
53 49
</fieldset>
54 50
<br />
55

  
56

  
57

  
vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb
1
<%= f.error_messages %>  
1
<%= f.error_messages %> 
2
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2 3

  
3 4
<h3><%= f.text_field :title, :required => true, :size => 70 %></h3>
4 5

  
......
16 17
  </div>
17 18

  
18 19
<h3><%= l(:authors) %></h3>    
19
<div class="box tabular">
20
  <div id="authors" class="fields">
21
    <% f.fields_for :authorships do |builder| -%>
22
      <%= render "authorship_fields", :f => builder %>
20
  <div class="box tabular">
21
    <div id="authors" class="fields">
22
      
23
      <% f.fields_for :authorships do |builder| -%>
24
        <%= render "authorship_fields", :f => builder %>
23 25
      <%- end -%>
26

  
27
      <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
28
    </div>
24 29
  </div>
25
  <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
26
</div>
30
</div>

Also available in: Unified diff