Revision 723:d41bf754c0f2 vendor/plugins/redmine_bibliography/app/views

View differences:

vendor/plugins/redmine_bibliography/app/views/authors/index.html.erb
1
<h2><%=l(:label_authors_index)%></h2>
2

  
3
<table class="list authors">		
4
	<thead><tr>
5
	<th><%=l(:field_author_name)%></th>
6
	<th><%=l(:field_author_username)%></th>
7
	<th><%=l(:field_author_publications)%></th>
8
	</tr></thead>
9
	<tbody>
10
	  	
11
  <% @authors.each do |author|%>    
12
	<tr id="author-<%= author.id %>" class="<%= cycle('odd', 'even') %>">
13
		<td class="title">
14
			<%= link_to_author author %>
15
		</td>
16
    <td class="username ">
17
      <%= link_to author.user unless author.user.nil? %>
18
    </td>
19
    <td class="project">             
20
      <%= render_author_publications(author) %>	
21
    </td>
22
	</tr>
23
	<% end %>
24
	</tbody>
25
</table>
26

  
vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb
1
<h2><%=l(:label_authors_show)%></h2>
2

  
3
<div class="autoscroll">
4
  <table class="list authors">		
5
  	<thead>
6
  	  <tr>
7
  	    <th><%=l(:field_authorship_publication_title)%></th>
8
  	    <th><%=l(:field_authorship_name)%></th>
9
  	    <th><%=l(:field_authorship_email)%></th>
10
	 	    <th><%=l(:field_authorship_institution)%></th>
11
  	  </tr>
12
  	</thead>
13
  
14
     <% @author.authorships.each do |authorship| %>
15
       <tr id="authorship-<%= authorship.id %>" class="<%= cycle('odd', 'even') %>">
16
         <td class="title"><%= link_to_publication(authorship.publication) %></td>
17
         <td class="name"><%= h authorship.name_on_paper %></td>
18
         <td class="email"><%= h authorship.email %></td>
19
         <td class="institution"><%= h authorship.institution %></td>
20
       </tr>
21
    <% end %>
22
  	</tbody>
23
  </table>
24
</div>
25

  
26
<% content_for :sidebar do %>
27
<% end %>
28
  
vendor/plugins/redmine_bibliography/app/views/authorships/update.html.erb
1
<h2>Authorships#update</h2>
vendor/plugins/redmine_bibliography/app/views/mailer/publication_added.text.html.rhtml
1
<%= l(:mail_body_publication_added, :publication => @publication.title, :project => @project.name) %>
vendor/plugins/redmine_bibliography/app/views/mailer/publication_added.text.plain.rhtml
1
<%= l(:mail_body_publication_added, :publication => @publication.title, :project => @project.name) %>
2

  
vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb
1
<% get_my_publications %>
2

  
3
<h3><%=l(:label_my_publications_box) %> <%= "(" + @my_publications.count.to_s + ")" %> </h3>
4

  
5
<table class="list publications">		
6
	<thead><tr>
7
	<th><%=l(:field_publication_title)%></th>
8
	<th><%=l(:field_publication_authors)%></th>
9
	<th><%=l(:field_publication_projects)%></th>
10
	</tr></thead>
11
	<tbody>
12
	  	
13
  <% @my_publications.each do |publication|%>    
14
	<tr id="publication-<%= publication.id %>" class="<%= cycle('odd', 'even') %>">
15
		<td class="title">
16
			<%= link_to publication.title, publication %>
17
		</td>
18
    <td class="authors">
19
      <%= render_publications_authors(publication) %>
20
    </td>
21
    <td class="project">             
22
      <%= render_publications_projects(publication) %>	
23
    </td>
24
	</tr>
25
	<% end %>
26
	</tbody>
27
</table>
28

  
29

  
30

  
vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb
1
<% if @project.publications.any? %>
2
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
3
  <div id="bibliography">
4
    <div class="box">
5
    <h3><%=l(:label_related_publication_plural)%></h3>
6

  
7
   <dl>
8
     <% @project.publications.each do |publication| %>
9
     <dt>
10
       <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %>
11
     </dt>
12
     <dd>
13
     <span class="authors">
14
       <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
15
     </span>
16
     <% if publication.bibtex_entry.year.to_s != "" %>
17
     <span class="year">
18
       <%= publication.bibtex_entry.year %>
19
     </span>
20
     <% end %>
21
     </dd>
22
   <% end -%>
23
   </dl>
24
  </div>
25
</div>
26
<% end %>
vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml
1
<div class="contextual">
2
	<% if User.current.allowed_to?(:add_subprojects, @project) %>
3
		<%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
4
	<% end %>
5
	
6
	<% if @project.module_enabled? :redmine_bibliography %>
7
	  <% if User.current.allowed_to?(:add_publication, @project) %>	
8
		  <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>		
9
	  <% end %>
10
	<% end %>
11
</div>
12

  
13
<% if @project.has_welcome_page %>
14
<% page = @project.wiki.find_page("Overview") %>
15
<% end %>
16

  
17
<% if page %>
18

  
19
<% if @project.module_enabled? :wiki %>
20
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
21
<div class="contextual">
22
<%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
23
</div>
24
<% end %>
25
<% end %>
26

  
27
<div class="contextual" style="clear: right">
28
<ul>
29
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
30
<% if @subprojects.any? %>
31
	<li><%=l(:label_subproject_plural)%>:
32
	    <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
33
<% end %>
34
</ul>
35
</div>
36

  
37
<%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
38

  
39
<% else %>
40

  
41
<h2><%=l(:label_overview)%></h2> 
42
	
43
<div class="splitcontentleft">
44
	<div class="wiki">
45
		<%= textilizable @project.description %>
46
	</div>	
47
	<ul>
48
	<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %></li><% end %>
49
  <% if @subprojects.any? %>
50
 	<li><%=l(:label_subproject_plural)%>:
51
	    <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
52
  <% end %>
53
	<% @project.visible_custom_field_values.each do |custom_value| %>
54
	<% if !custom_value.value.blank? %>
55
	   <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
56
	<% end %>
57
	<% end %>
58
	</ul>	
59

  
60
  <% if User.current.allowed_to?(:view_issues, @project) %>
61
  <div class="issues box">    
62
    <h3><%=l(:label_issue_tracking)%></h3>
63
    <ul>
64
    <% for tracker in @trackers %>    
65
      <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project, 
66
                                                :set_filter => 1, 
67
                                                "tracker_id" => tracker.id %>:
68
					<%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
69
																										:total => @total_issues_by_tracker[tracker].to_i) %>
70
			</li>
71
    <% end %>
72
    </ul>
73
    <p>
74
    	<%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
75
	    <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
76
				| <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
77
			<% end %>
78
			<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
79
				| <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
80
			<% end %>
81
		</p>
82
  </div>
83
  <% end %>
84
  <%= call_hook(:view_projects_show_left, :project => @project) %>
85
</div>
86

  
87
<div class="splitcontentright">
88
  
89
  <%= render :partial => 'bibliography_box' %>
90
  
91
  <%= render :partial => 'members_box' %>
92
    
93
  <% if @news.any? && authorize_for('news', 'index') %>
94
  <div class="news box">
95
    <h3><%=l(:label_news_latest)%></h3>  
96
    <%= render :partial => 'news/news', :collection => @news %>
97
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
98
  </div>  
99
  <% end %>
100
  <%= call_hook(:view_projects_show_right, :project => @project) %>
101
</div>
102

  
103
<% content_for :sidebar do %>
104
    <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
105
    <h3><%= l(:label_spent_time) %></h3>
106
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
107
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
108
    <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>
109
    <% end %>
110
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
111
<% end %>
112

  
113
<% end %>
114

  
115
<% content_for :header_tags do %>
116
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
117
<% end %>
118

  
119
<% html_title(l(:label_overview)) -%>
vendor/plugins/redmine_bibliography/app/views/publications/_add_project_form.html.erb
1
<% form_remote_for(:publication, 
2
                     :url => {:controller => 'publications', :action => 'add_project', :id => @publication, :project_id => @project}, 
3
                     :method => :post,
4
                     :html => { :id => 'add_project_form' }, 
5
									   :loading => "$('project-add-submit').disable()",
6
									   :complete => "$('project-add-submit').enable()") do |f| %>
7
								<fieldset><legend><%=l(:label_add_project_to_publication)%></legend>
8
	      <p>
9
	        <%= label_tag "project_search", l(:label_project_search) %><%= text_field_tag 'project_search', nil %>
10
	      </p>
11
	     
12
	      <%= observe_field(:project_search,
13
               :frequency => 0.5,
14
               :update => :projects,
15
               :url => { :controller => 'publications', :action => 'autocomplete_for_project', :id => @publication },
16
               :with => 'q')
17
                %>
18

  
19
					<div id="projects">
20
					<% if params[:q] && params[:q].length > 1 %>
21
			  		  <%= projects_check_box_tags 'project[project_ids][]', @projects %>
22
					<% end %>
23
					</div>
24

  
25
        <p><%= submit_tag l(:button_add), :id => 'project-add-submit' %></p>
26
    
27
    
28
      </fieldset>
29
  <% end %>
vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml
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 ), :onclick => "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 ), :onclick => "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 ), :onclick => "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

  
53
 <% end %>
54

  
55

  
56
  <%= link_to_remove_fields l("remove_author"), f %>
57
  </p>
58
</div>
59
<br/>
vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb
1
<p>
2
  <label for="bibtex_entry_type"><%=l("field_entry_type")%> <span class="required">*</span></label>
3
	<%= f.collection_select :entry_type, 
4
	        BibtexEntryType.find(:all).reject { |x| x.redundant? }, 
5
	        :id, 
6
	        :label,  
7
	        { :selected => @selected_bibtex_entry_type_id, :prompt => true },	           
8
	        :onChange => remote_function( :url => { :controller => :publications, :action => :get_bibtex_required_fields}, :with => "'value=' + value" )	              
9
	%>
10
</p>
11

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

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

  
5
<div class="splitcontentleft">      
6
  <h3><%= l(:label_publication_other_details) %></h3>
7
  <div class="box tabular">
8
    <% f.fields_for :bibtex_entry do |builder| -%>
9
      <%= render :partial => 'bibtex_fields', :locals => { :f => builder}  %>
10
    <%- end -%>
11

  
12
    <p>
13
      <%= f.text_field :external_url, :size => 70 %>
14
      <br />
15
      <em><%= l(:text_external_url) %></em>
16
    </p>
17

  
18
  </div>
19
</div>
20

  
21
<div class="splitcontentright">
22
  <h3><%= l(:authors) %></h3>    
23
  <div class="box tabular">
24
    <% f.fields_for :authorships do |builder| -%>
25
      <%= render "authorship_fields", :f => builder %>
26
    <%- end -%>
27
    <%= link_to_add_fields l(:label_add_an_author), f, :authorships %>
28
  </div>
29
</div>
30

  
31

  
vendor/plugins/redmine_bibliography/app/views/publications/_identify_author_form.html.erb
1
<legend><%= "Identify Authors in the system…" %></legend>
2

  
3
<%= link_to_remote "It's me!", 
4
   { :url => { :controller => 'publications', 
5
     :action => 'add_me_as_author',
6
     :project_id => @project }, :method => 'post'}, 
7
   { :class => 'icon icon-add', :id => "add_me_as_author" } %>
8

  
9
<p>
10
  <%= label_tag "author_search", l(:label_project_search) %><%= text_field_tag 'author_search', nil %>
11
</p>
12
	     
13
<%= observe_field( form_tag_id(f.object_name, :name),
14
     :frequency => 0.5,
15
     :update => :identify_author,
16
     :url => { :controller => 'publications', :action => 'autocomplete_for_author' },
17
     :with => 'q')
18
%>
19

  
20
<div id="identify_author">
21
  <% if params[:q] && params[:q].length > 1 %>
22
    <%= select_author_links 'author[author_ids][]', @authors %>
23
  <% end %>
24
</div>
25

  
vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb
1
<%= render_projects_list(@publication, true) %>
vendor/plugins/redmine_bibliography/app/views/publications/_new_bibtex_step.html.erb
1
<h3>New Bibtex</h3>
2

  
3
<h4>Paste your Bibtex entries here</h4>
4
<p>
5
  <%=label_tag :bibtex_entry %>
6
  <%=text_area_tag :bibtex_entry%>  
7
</p>
8

  
9

  
vendor/plugins/redmine_bibliography/app/views/publications/_review_bibtex_step.html.erb
1
<h2>Review new entries</h2>
2

  
vendor/plugins/redmine_bibliography/app/views/publications/add_project.rjs
1
page.replace_html :list_projects, :partial => 'list_projects'
2
page[:add_project_form].reset
3

  
vendor/plugins/redmine_bibliography/app/views/publications/autocomplete_for_author.rhtml
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.rhtml
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/create.html.erb
1
<h2>Publications#create</h2>
vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb
1
<% content_for :header_tags do %>
2
    <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
3
    <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>  
4
    <%= javascript_tag 'Event.observe(window, "load", function(e){show_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %>
5
<% end %>
6

  
7
<h2><%=l(:label_publication_show)%></h2>
8

  
9
<% form_for @publication, :url => { :project_id  => @project, :action => :update }, :builder => TabularFormBuilder do |f| -%>
10
  <%= render :partial => 'form', :locals => { :f => f }  %>
11

  
12
  <div style="clear:both"></div>
13
  <%= f.submit %>
14
<% end %>
15
<p>
16
  <%= link_to l(:label_publication_show), { :controller => "publications", :action => "show", :id => @publication, :project_id => @project_id } %> |
17
  <%= link_to l(:label_publication_index), { :controller => "publications", :action => "index", :project_id => @project } %>
18
</p>
vendor/plugins/redmine_bibliography/app/views/publications/import.html.erb
1
<h1>New Publication</h1>
2

  
3
<% form_for @publication, :url => { :action => "create" } do |f| %>
4
  <% f.error_messages %>
5

  
6
  <%= render :partial  => "#{@publication.current_step}_bibtex_step", :locals => { :f => f }  %>
7

  
8
  <p><%= f.submit "Submit" %></p>
9
  <p><%= f.submit "Back", :name => "back_button" unless @publication.first_step? %></p>
10
  
11
<% end %>
12

  
vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb
1
<div class="contextual">
2
  <% if User.current.allowed_to?(:add_publication, @project) %>			
3
	  <%= link_to l(:label_publication_new), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>
4
	<% end %>
5
</div>
6

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

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

  
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 -%>
35
  </table>
36
  </div>
37

  
38
<% content_for :sidebar do %>
39
<% end %>
40
  
vendor/plugins/redmine_bibliography/app/views/publications/new.html.erb
1
<% content_for :header_tags do %>
2
    <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
3
    <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
4
<% end %>
5

  
6
<h2><%=l(:label_publication_new)%></h2>
7

  
8
<% form_for @publication, :url => { :project_id  => @project, :action => :create }, :builder => TabularFormBuilder do |f| -%>
9
  <%= render :partial => 'form', :locals => { :f => f }  %>
10
  <div style="clear:both"></div>
11
  <%= f.submit %>
12
<% end %>
vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3
<h2><%=l(:label_publication_show)%></h2>
4

  
5
<div class="box">
6
<h3>
7
  <%= h @publication.title %>
8
</h3>
9

  
10
<h4><%= l(:authors) %></h4>
11
<ul id="authorships">
12
  <% for authorship in @publication.authorships.find(:all, :order => :auth_order) %>
13
    <% content_tag_for :li, authorship do %>
14
      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>    
15
        <span class="handle">[drag to reorder]</span>
16
      <%- end -%>
17
      <%= link_to_authorship authorship %> <em><%= h authorship.institution %></em> <br />
18
    <%- end -%>
19
  <%- end -%>
20
</ul>
21
<%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
22
  <%= sortable_element("authorships", :url => { :controller => :publications, :action => :sort_author_order }, :handle => "handle") %>
23
<%- end -%>
24

  
25
<%- if @publication.bibtex_entry != nil -%>
26
  <%= show_bibtex_fields(@publication.bibtex_entry) %>
27
<%- end -%>
28

  
29

  
30
<% unless @publication.external_url.blank? %>
31
  <h4>
32
    <%= l(:field_external_url) %>
33
  </h4>
34
  <p>
35
    <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} %>
36
  </p>
37
<% end %>
38

  
39
<br / >
40
  <% if User.current.allowed_to?(:add_publication, @project) %>	
41
    <%= link_to l(:label_publication_edit), { :controller => "publications", :action => "edit", :id => @publication, :project_id => @project } %> |
42
    <%= link_to "Delete", {:controller => 'publications', :action => 'destroy', :id => @publication, :project_id => @project },
43
                                                     :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> |
44
  <% end %>
45
  <%= link_to l(:view_all_publications), {:controller => 'publications', :action => 'index', :project_id => @project } %>
46
</div>
47

  
48
<% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %>
49

  
50
<% content_for :sidebar do %>
51
  <h3><%=l(:label_publication_project_index)%></h3>
52

  
53
  <p id="list_projects">
54
    <%= render :partial => 'list_projects' %>
55
  </p>
56
  
57
  <%- if User.current.allowed_to?(:edit_publication, @project) -%>
58
    <%= render :partial => 'add_project_form' %>    
59
  <%- end -%>
60
<% end %>
vendor/plugins/redmine_bibliography/app/views/publications/update.html.erb
1
<h2>Publications#update</h2>
vendor/plugins/redmine_bibliography/app/views/settings/_bibliography.rhtml
1
<p><label>Menu caption</label>
2
<%= text_field_tag 'settings[menu]', @settings['menu'], :size => 30 %>
3
<br /><em>Clear this field if you don't want to add a tab to the project menu</em></p>
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 %>

Also available in: Unified diff