Revision 718:378aca14739f vendor/plugins

View differences:

vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb
64 64

  
65 65
  def get_bibtex_required_fields
66 66

  
67
    fields = BibtexEntryType.fields(params[:value])
68
    all_fields = BibtexEntryType.all_fields
67
    unless params[:value].empty?
68
      fields = BibtexEntryType.fields(params[:value]) 
69
    end
69 70

  
70 71
    respond_to do |format|
71 72
      format.js {
72
        render(:update) {|page| 
73
          all_fields.each_with_index do |field, idx|            
74
            unless fields.include? field
75
              page["publication_bibtex_entry_attributes_#{field}"].up('p').hide()
76
            else
77
              page["publication_bibtex_entry_attributes_#{field}"].up('p').show()
78
            end            
73
        render(:update) {|page|       
74
          if params[:value].empty?
75
            page << "hideOnLoad();"
76
          else
77
            page << "show_required_bibtex_fields(#{fields.to_json()});"
79 78
          end
80 79
        }
81 80
      }
81
    
82 82
    end
83 83
  end
84 84

  
vendor/plugins/redmine_bibliography/app/helpers/authorships_helper.rb
1
# -*- coding: undecided -*-
1 2
module AuthorshipsHelper
3

  
4
  # Generates a link to either author or user, depending on which is
5
  # available
6
  def link_to_authorship(authorship)
7
    s = ''
8
    if authorship.author.nil?
9
      # legacy reasons…
10
      s << h(authorship.name_on_paper)
11
    else
12
      if authorship.author.user.nil?      
13
        s << link_to(authorship.name_on_paper, :controller => 'authors', :action => 'show', :id => authorship.author)
14
      else
15
        s << link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user)
16
      end
17
    end
18
    s
19
  end
20

  
2 21
end
vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb
2 2
require 'bibtex'
3 3

  
4 4
module PublicationsHelper
5
  include AuthorshipsHelper
5 6

  
6 7
  def link_to_publication(publication, options={}, html_options = nil)
7 8
    url = {:controller => 'publications', :action => 'show', :id => publication}.merge(options)
......
11 12
  def projects_check_box_tags(name, projects)
12 13
    s = ''
13 14
    projects.sort.each do |project|
14
      s << "<label>#{ check_box_tag name, project.id, false } #{link_to_project project}</label>\n"
15
      if User.current.allowed_to?(:edit_publication, project) 
16
        s << "<label>#{ check_box_tag name, project.id, false } #{link_to_project project}</label>\n"
17
        s << '<br />'
18
      end
15 19
    end
20

  
16 21
    s 
17 22
  end
18 23
  
......
42 47
    f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)", :class => 'icon icon-del')
43 48
  end
44 49
    
45
  def link_to_add_fields(name, f, association)
50
  def link_to_add_author_fields(name, f, association, action)
46 51
    new_object = f.object.class.reflect_on_association(association).klass.new
47 52
    fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
48 53
      render(association.to_s.singularize + "_fields", :f => builder)
49 54
    end    
50
    link_to_function(name, h("add_fields(this, '#{association}', '#{escape_javascript(fields)}')"), { :class => 'icon icon-add', :id => "add_another_author" })
55
    link_to_function(name, h("add_author_fields(this, '#{association}', '#{escape_javascript(fields)}', '#{action}')"), { :class => 'icon icon-add', :id => "add_another_author" })
51 56
  end  
52 57

  
53 58
  def sanitized_object_name(object_name)
......
72 77
    str = object_name.split("\[").last().gsub("\]","")
73 78
    str.to_sym
74 79
  end
80

  
81
  def render_authorships_list(publication)   
82
    s = '<p>'
83
    
84
    publication.authorships.each do |authorship|
85
      s << link_to_authorship(authorship)
86
      s << "<br /><em>#{authorship.institution}</em></p>"
87
    end    
88

  
89
    s   
90
  end
75 91
  
76
  def render_projects_list(publication)
77
    logger.error { "PROJECT NAME #{@project.name unless @project.nil?}" }
78 92
    
79
    s = ""
80

  
81
    publication.projects.each do |proj|
93
  def render_projects_list(publication, show_delete_icon)    
94
    s= ""
95
    
96
    publication.projects.visible.each do |proj|
82 97
      s << link_to_project(proj, {}, :class => 'publication_project')
83
      
84
      if User.current.allowed_to?(:edit_publication, @project)
85
        if @project == proj
86
          confirm_msg = 'Are you sure you want to remove the current project from this publication\'s projects list?'
87
        else
88
          confirm_msg = false
89
        end 
90
            
91
        s << link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj,  :project_id => @project }, :method => :post, :confirm => confirm_msg }, :class => 'icon icon-del') 
98
    
99
      if show_delete_icon  
100
        if User.current.allowed_to?(:edit_publication, @project)
101
          if @project == proj
102
            confirm_msg = 'Are you sure you want to remove the current project from this publication\'s projects list?'
103
          else
104
            confirm_msg = false
105
          end 
106
          
107
          s << link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj,  :project_id => @project }, :method => :post, :confirm => confirm_msg }, :class => 'icon icon-del') 
108
        end
92 109
      end
93 110
      
94
      s << "<br />"
95
      
96
    end
97
    
111
      s << "<br />"      
112
    end    
113

  
98 114
    s  
99 115
  end
100 116
  
vendor/plugins/redmine_bibliography/app/models/bibtex_entry_type.rb
1 1
class BibtexEntryType < ActiveRecord::Base
2 2

  
3
  @@all_fields = [ "editor", "publisher", "chapter", "pages", "volume", "series", "address", "edition", "month", "year", "type", "note", "number", "journal", "howpublished", "key", "school" ]
4

  
5 3
  @@fields = Hash['article', ['journal', 'year', 'volume', 'number', 'pages', 'month', 'note' ], 
6 4
                  'book' , [ 'editor', 'publisher', 'volume', 'series', 'address', 'edition', 'month', 'year', 'note' ],
7 5
                  'booklet' , [ 'howpublished', 'address', 'year', 'month', 'note', 'key' ],
......
28 26
  def self.fields (type)
29 27
    @@fields[ self.find(type).name ]    
30 28
  end
31

  
32
  def self.all_fields
33
    @@all_fields
34
  end
35 29
end
vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb
1 1
<h2><%=l(:label_authors_show)%></h2>
2 2

  
3
<div class="splitcontentleft">
3
<div class="autoscroll">
4 4
  <table class="list authors">		
5 5
  	<thead>
6 6
  	  <tr>
......
21 21
    <% end %>
22 22
  	</tbody>
23 23
  </table>
24
</div>
24
</div>
25

  
26
<% content_for :sidebar do %>
27
<% end %>
28
  
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/_bibtex_fields.html.erb
8 8
	        :onChange => remote_function( :url => { :controller => :publications, :action => :get_bibtex_required_fields}, :with => "'value=' + value" )	              
9 9
	%>
10 10
</p>
11
<p> 
12
  <%= f.text_field :year, :size => 4, :class => 'bibtex' %> 
11

  
12
<p class="bibtex hol"> 
13
  <%= f.text_field :year, :size => 4 %> 
13 14
</p>
14
<p> 
15
  <%= f.text_field :month, :size => 4, :class => 'bibtex' %> 
15
<p class="bibtex hol"> 
16
  <%= f.text_field :month, :size => 4%> 
16 17
</p>
17
<p> 
18
  <%= f.text_field :chapter, :size => 15, :class => 'bibtex' %>  
18
<p class="bibtex hol">  
19
  <%= f.text_field :chapter, :size => 15%>  
19 20
</p>  
20
<p>   
21
  <%= f.text_field :editor, :size => 33, :class => 'bibtex'  %>  
21
<p class="bibtex hol"> 
22
  <%= f.text_field :editor, :size => 33  %>  
22 23
</p>  
23
<p>   
24
  <%= f.text_field :booktitle, :size => 33, :class => 'bibtex'  %>  
24
<p class="bibtex hol"> 
25
  <%= f.text_field :booktitle, :size => 33  %>  
25 26
</p>  
26
<p>   
27
  <%= f.text_field :publisher,:size => 33, :class => 'bibtex'  %>  
27
<p class="bibtex hol"> 
28
  <%= f.text_field :publisher,:size => 33  %>  
28 29
</p>  
29
<p>   
30
  <%= f.text_field :pages, :size => 12, :class => 'bibtex'  %>  
30
<p class="bibtex hol"> 
31
  <%= f.text_field :pages, :size => 12 %>  
31 32
</p>
32
<p>
33
 <%= f.text_field :address, :class => 'bibtex' %>
33
<p class="bibtex hol"> 
34
 <%= f.text_field :address %>
34 35
</p>
35
<p>
36
 <%= f.text_field :annote, :class => 'bibtex' %>
36
<p class="bibtex hol"> 
37
 <%= f.text_field :annote %>
37 38
</p>
38
<p>
39
 <%= f.text_field :crossref, :class => 'bibtex' %>
39
<p class="bibtex hol"> 
40
 <%= f.text_field :crossref %>
40 41
</p>
41
<p>
42
 <%= f.text_field :edition, :class => 'bibtex' %>
42
<p class="bibtex hol"> 
43
 <%= f.text_field :edition %>
43 44
</p>
44
<p>
45
 <%= f.text_field :eprint, :class => 'bibtex' %>
45
<p class="bibtex hol"> 
46
 <%= f.text_field :eprint %>
46 47
</p>
47
<p>
48
 <%= f.text_field :howpublished, :class => 'bibtex' %>
48
<p class="bibtex hol"> 
49
 <%= f.text_field :howpublished %>
49 50
</p>
50
<p>
51
 <%= f.text_field :journal, :class => 'bibtex' %>
51
<p class="bibtex hol"> 
52
 <%= f.text_field :journal %>
52 53
</p>
53
<p>
54
 <%= f.text_field :key, :class => 'bibtex' %>
54
<p class="bibtex hol"> 
55
 <%= f.text_field :key %>
55 56
</p>
56
<p>
57
 <%= f.text_field :note, :class => 'bibtex' %>
57
<p class="bibtex hol"> 
58
 <%= f.text_field :note %>
58 59
</p>
59
<p>
60
 <%= f.text_field :number, :class => 'bibtex' %>
60
<p class="bibtex hol"> 
61
 <%= f.text_field :number %>
61 62
</p>
62
<p>
63
 <%= f.text_field :organization, :class => 'bibtex' %>
63
<p class="bibtex hol"> 
64
 <%= f.text_field :organization %>
64 65
</p>
65
<p>
66
 <%= f.text_field :school, :class => 'bibtex' %>
66
<p class="bibtex hol"> 
67
 <%= f.text_field :school %>
67 68
</p>
68
<p>
69
 <%= f.text_field :series, :class => 'bibtex' %>
69
<p class="bibtex hol"> 
70
 <%= f.text_field :series %>
70 71
</p>
71
<p>
72
 <%= f.text_field :type, :class => 'bibtex' %>
72
<p class="bibtex hol"> 
73
 <%= f.text_field :type %>
73 74
</p>
74
<p>
75
 <%= f.text_field :url, :class => 'bibtex' %>
75
<p class="bibtex hol"> 
76
 <%= f.text_field :url %>
76 77
</p>
77
<p>
78
 <%= f.text_field :volume, :class => 'bibtex' %>
79
</p>
80

  
78
<p class="bibtex hol"> 
79
 <%= f.text_field :volume %>
80
</p>
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/publications/_list_projects.html.erb
1
<%= render_projects_list(@publication) %>
1
<%= render_projects_list(@publication, true) %>
vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb
1 1
<% content_for :header_tags do %>
2 2
    <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
3 3
    <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>  
4
    <%= javascript_tag 'Event.observe(window, "load", function(e){show_all_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %>
4
    <%= javascript_tag 'Event.observe(window, "load", function(e){show_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %>
5 5
<% end %>
6 6

  
7 7
<h2><%=l(:label_publication_show)%></h2>
vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb
5 5
</div>
6 6

  
7 7
  <% if @project %>
8
  <h3><%= l(:label_all_publications_for_project, :project => @project.name) %></h3>
8
    <h3><%= l(:label_all_publications_for_project, :project => @project.name) %></h3>
9 9
  <% else %>
10
  <h3><%= l(:label_all_publications) %></h3>
10
    <h3><%= l(:label_all_publications) %></h3>
11 11
  <% end %>
12 12

  
13 13
  <div class="autoscroll">
......
15 15
    <thead><tr>
16 16
      <th><%= l(:title) %></th> 
17 17
      <th><%= l(:authors) %></th> 
18
      <th><%= l(:year) %></th> 
18
      <th><%= l(:year) %></th>
19
      <th><%= l(:associated_projects) %></th>
19 20
    </tr></thead>
20 21

  
21
    <% @publications.each do |publication| %>
22
    <tr class="<%= cycle('odd', 'even') %>">
23
      <td class="firstcol title" align="top"><%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %></td>
24
      <td class="authors" align="top">
25
	      <% publication.authorships.each do |authorship| %>
26
	          <%# if authorship.author.user.nil? || !authorship.author.user.active? %>
27
	            <%= h authorship.name_on_paper %>
28
	          <%# else %>
29
              <%#= link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user) %>
30
	          <%# end %>
31
	          
32
	<em><%= authorship.institution %></em><br/>
33
	<% end %>
34
      <td class="year"><%= publication.bibtex_entry.year %></td>
35
    </tr>
36
    <% end %>    
22
    <%- @publications.each do |publication| -%>        
23
      <%- if publication.projects.visible.length > 0 -%>
24
        <tr class="<%= cycle('odd', 'even') %>">
25
          <td class="firstcol title" align="top"><%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %></td>
26
          <td class="authors" align="top">
27
            <%= render_authorships_list(publication) %>
28
          <td class="year"><%= publication.bibtex_entry.year %></td>
29
          <td class="projects">
30
              <%= render_projects_list(publication, false) %>
31
          </td>
32
        </tr>
33
      <%- end -%>
34
    <%- end -%>
37 35
  </table>
38 36
  </div>
39 37

  
vendor/plugins/redmine_bibliography/app/views/publications/new.html.erb
1 1
<% content_for :header_tags do %>
2 2
    <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
3 3
    <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
4
    <%= javascript_tag 'Event.observe(window, "load", hide_all_bibtex_required_fields);' %>
5 4
<% end %>
6 5

  
7 6
<h2><%=l(:label_publication_new)%></h2>
vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb
14 14
      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>    
15 15
        <span class="handle">[drag to reorder]</span>
16 16
      <%- end -%>
17
      <%= h authorship.name_on_paper %> <em><%= h authorship.institution %></em> <br />
17
      <%= link_to_authorship authorship %> <em><%= h authorship.institution %></em> <br />
18 18
    <%- end -%>
19 19
  <%- end -%>
20 20
</ul>
vendor/plugins/redmine_bibliography/app/views/users/show.rhtml
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3
<div class="contextual">
4
<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %>
5
</div>
6

  
7
<h2><%= avatar @user, :size => "50" %> <%=h @user.name %></h2>
8

  
9
<div class="splitcontentleft">
10
<ul>
11
	<% unless @user.pref.hide_mail %>
12
		<li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
13
	<% end %>
14
	<% @user.visible_custom_field_values.each do |custom_value| %>
15
	<% if !custom_value.value.blank? %>
16
    <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
17
	<% end %>
18
	<% end %>
19
    <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
20
	<% unless @user.last_login_on.nil? %>
21
		<li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li>
22
	<% end %>
23
</ul>
24

  
25
<h3><%=l(:label_ssamr_description)%></h3>
26
<%= textilizable @description %>
27

  
28
<h3><%=l(:label_ssamr_institution)%></h3>
29
<p><%= h @institution_name %></p>
30

  
31

  
32
<% unless @memberships.empty? %>
33
<h3><%=l(:label_project_plural)%></h3>
34
<ul>
35
<% for membership in @memberships %>
36
	<li><%= link_to_project(membership.project) %>
37
    (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li>
38
<% end %>
39
</ul>
40
<% end %>
41
<%= call_hook :view_account_left_bottom, :user => @user %>
42
</div>
43

  
44
<div class="splitcontentright">
45

  
46
  <% if @user.author %>
47
  <div id="bibliography">
48
    <% @publications = Publication.all(:include => :authors, :conditions => "authors.id = #{@user.author.id}") %>
49

  
50
    <h3><%=l(:publications) %> <%= "(" + @publications.count.to_s + ")" %> </h3>
51

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

  
57
      <dd>
58
        <span class="authors">
59
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
60
        </span>
61
        <% if publication.bibtex_entry.year.to_s != "" %>
62
          <span class="year">
63
            <%= publication.bibtex_entry.year %>
64
          </span>
65
        <% end %>
66
      </dd>
67
  	<% end %>
68
  </div>
69
  <% end %>
70

  
71

  
72
<% unless @events_by_day.empty? %>
73
<h3><%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3>
74

  
75
<p>
76
<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
77
</p>
78

  
79
<div id="activity">
80
<% @events_by_day.keys.sort.reverse.each do |day| %>
81
<h4><%= format_activity_day(day) %></h4>
82
<dl>
83
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
84
  <dt class="<%= e.event_type %>">
85
  <span class="time"><%= format_time(e.event_datetime, false) %></span>
86
  <%= content_tag('span', h(e.project), :class => 'project') %>
87
  <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
88
  <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
89
<% end -%>
90
</dl>
91
<% end -%>
92
</div>
93

  
94
<% other_formats_links do |f| %>
95
	<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
96
<% end %>
97

  
98
<% content_for :header_tags do %>
99
		<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
100
<% end %>
101
<% end %>
102
<%= call_hook :view_account_right_bottom, :user => @user %>
103
</div>
104

  
105
<% html_title @user.name %>
vendor/plugins/redmine_bibliography/assets/javascripts/authors.js
3 3
    $(link).up(".fields").hide();
4 4
}
5 5

  
6
function add_fields(link, association, content) {
7
    var new_id = new Date().getTime();
8
    var regexp = new RegExp("new_" + association, "g")
9
    $(link).insert({
10
	before: content.replace(regexp, new_id)
11
    });
6
function add_author_fields(link, association, content, action) {
7
	var new_id = new Date().getTime();
8
  var regexp = new RegExp("new_" + association, "g");
9
  $(link).insert({
10
		before: content.replace(regexp, new_id)
11
  });
12
	if(action != "new"){
13
		toggle_save_author(new_id, $(link));
14
	};
12 15
}
13 16

  
14 17
function identify_author_status(status, object_id) {
......
57 60
    toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
58 61
}
59 62

  
60
function edit_author(form_object_id){}
63
function hide_all_bibtex_required_fields(){$$('p.bibtex').each(function(s){s.hide()})}
61 64

  
62
function hide_all_bibtex_required_fields() {
63
	$$('input.bibtex').each(function(s){
64
	    s.up('p').hide();
65
		})}
66
		
67
function show_all_required_bibtex_fields(entrytype_fields) {
68
	$$('input.bibtex').each(function(s){
69
    if(entrytype_fields.indexOf(s.id.split('_').last()) == -1){s.up('p').hide()};
65
// entrytype_fields is a jsno array with the fields requires by the selected bibtex entry 
66
function show_required_bibtex_fields(entrytype_fields) {
67
	$$('p.bibtex').each(function(s){
68
		if(entrytype_fields.indexOf(s.down('input').id.split('_').last()) != -1){
69
			s.show();
70
			}
71
		else {
72
			s.hide();
73
			}
70 74
	})
71 75
}
72 76
		
vendor/plugins/redmine_bibliography/config/locales/en.yml
7 7
  author: "Author"
8 8
  name: "Name"
9 9
  year: "Year"
10
  associated_projects: "Associated Projects"
10 11
  publications_box: "My Publications"
11 12
  label_my_publications_box: "My Publications"
12 13
  view_all_publications: "View All Project's Publications"
14
  publications: Publications
15
  
13 16
  
14 17
  identify_author_question: Is the right person selected above?
15 18
  identify_author_yes: "Yes"
......
20 23

  
21 24
  label_all_publications: All Publications
22 25
  label_all_publications_for_project: Publications associated with %{project}
23
  label_authors_show: "Authorships by this author"
26
  label_authors_show: "Authorships associated with this author"
24 27
  label_authors_index: "List of authors"
25 28
  
26
  field_authorship_publication_title: "Publication Title"
27
  field_authorship_name: "Name"
28
  field_authorship_email: "Email Address"
29
  field_authorship_publication_title: "Publication"
30
  field_authorship_name: "Name on Paper"
31
  field_authorship_email: "Email"
29 32
  field_authorship_institution: "Institution"
30 33
  
31 34
  field_external_url: "External URL"
......
83 86
  field_publication_id: "Publication_id"
84 87
  field_address: "Address"
85 88
  field_annote: "Annote"
86
  field_booktitle: "Book Title"
89
  field_booktitle: "Title of Book or Proceedings"
87 90
  field_chapter: "Chapter"
88 91
  field_crossref: "Cross Reference"
89 92
  field_edition: "Edition"

Also available in: Unified diff