Revision 918:04114f36670d

View differences:

app/views/activities/_recent.erb
1
<% events = @events_by_day %>
2
<% max = 5 %>
3
<% if (events.nil?) 
4
     activity = Redmine::Activity::Fetcher.new(User.current, :project => @project)
5
     
6
     if @project
7
        # Don't show news (duplicated with News box) or wiki edits (too
8
	# tedious) in project front page
9
        activity.scope = [ "changesets", "files", "issues", "documents" ]
10
     end
11
     
12
     events = activity.events(Date.today - 28, Date.today + 1)
13
     
14
     if defined? user
15
       events = events.select { |e| user.member_of? e.project }
16
     end
17
     
18
     events = events.first(max)
19

  
20
   end
21
%>
22

  
23
<div id="activity">
24

  
25
<% if @project.nil? %>
26
   <%= content_tag('h3', l(:label_activity_my_recent)) %>
27
   <div class="activity box">
28
<% end %>
29

  
30
<% if events.empty? %>
31

  
32
   <% if @project.nil? %>
33
     <p><%= l(:label_activity_my_recent_none) %></p>
34
   <% end %>
35

  
36
<% else %>
37

  
38
   <% if !@project.nil? %>
39
     <div class="activity box">
40
     <%= content_tag('h3', l(:label_activity_recent)) %>
41
   <% end %>
42

  
43
   <dl>
44
   <% events.sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
45
     <dt class="<%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
46
	<%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
47
     <span class="time"><%= format_time(e.event_datetime) %></span>
48
     <%= content_tag('span', link_to_project(e.project), :class => 'project') if @project.nil? || @project != e.project %>
49
     <% if e.respond_to?(:event_author) %>
50
       <span class="author"><%= e.event_author %></span>
51
     <% end %>
52
     </dt>
53
     <dd><%= link_to format_activity_title(e.event_title), e.event_url %>
54
     <span class="description"><%= format_activity_description(e.event_description) %></span>
55
     </dd>
56
   <% end -%>
57
   </dl>
58

  
59
   </div>
60

  
61
<% end %>
62

  
63
<% if events.empty? and @project.nil? %></div><% end %>
64

  
65
</div>
app/views/activities/_recent.html.erb
1
<% events = @events_by_day %>
2
<% max = 5 %>
3
<% if (events.nil?) 
4
     activity = Redmine::Activity::Fetcher.new(User.current, :project => @project)
5
     
6
     if @project
7
        # Don't show news (duplicated with News box) or wiki edits (too
8
	# tedious) in project front page
9
        activity.scope = [ "changesets", "files", "issues", "documents" ]
10
     end
11
     
12
     events = activity.events(Date.today - 28, Date.today + 1)
13
     
14
     if defined? user
15
       events = events.select { |e| user.member_of? e.project }
16
     end
17
     
18
     events = events.first(max)
19

  
20
   end
21
%>
22

  
23
<div id="activity">
24

  
25
<% if @project.nil? %>
26
   <%= content_tag('h3', l(:label_activity_my_recent)) %>
27
   <div class="activity box">
28
<% end %>
29

  
30
<% if events.empty? %>
31

  
32
   <% if @project.nil? %>
33
     <p><%= l(:label_activity_my_recent_none) %></p>
34
   <% end %>
35

  
36
<% else %>
37

  
38
   <% if !@project.nil? %>
39
     <div class="activity box">
40
     <%= content_tag('h3', l(:label_activity_recent)) %>
41
   <% end %>
42

  
43
   <dl>
44
   <% events.sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
45
     <dt class="<%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
46
	<%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
47
     <span class="time"><%= format_time(e.event_datetime) %></span>
48
     <%= content_tag('span', link_to_project(e.project), :class => 'project') if @project.nil? || @project != e.project %>
49
     <% if e.respond_to?(:event_author) %>
50
       <span class="author"><%= e.event_author %></span>
51
     <% end %>
52
     </dt>
53
     <dd><%= link_to format_activity_title(e.event_title), e.event_url %>
54
     <span class="description"><%= format_activity_description(e.event_description) %></span>
55
     </dd>
56
   <% end -%>
57
   </dl>
58

  
59
   </div>
60

  
61
<% end %>
62

  
63
<% if events.empty? and @project.nil? %></div><% end %>
64

  
65
</div>
app/views/attachments/toggle_active.erb
1
<%=
2
file = Attachment.find(params[:id])
3
active_id = "active-" + file.id.to_s
4
link_to_remote image_tag(file.active? ? 'fav.png' : 'fav_off.png'),
5
  :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file},
6
  :update => active_id
7
%>
app/views/attachments/toggle_active.html.erb
1
<%=
2
file = Attachment.find(params[:id])
3
active_id = "active-" + file.id.to_s
4
link_to_remote image_tag(file.active? ? 'fav.png' : 'fav_off.png'),
5
  :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file},
6
  :update => active_id
7
%>
app/views/members/_editlist.erb
1
<%= error_messages_for 'member' %>
2

  
3
<% roles = Role.find_all_givable
4
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
5

  
6
<% if members.any? %>
7
<table class="list members">
8
	<thead><tr>
9
	  <th><%= l(:label_user) %></th>
10
	  <th><%= l(:label_role_plural) %></th>
11
          <th style="width:15%"></th>
12
	</tr></thead>
13
	<tbody>
14
	<% members.each do |member| %>
15
          <% next if member.new_record? %>
16
          <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
17
          <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
18
          <td class="roles">
19
            <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
20
            <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member},
21
      			 :method => :post, :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %>
22
            <p><% roles.each do |role| %>
23
              <label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
24
             <% end %></p>
25
        <%= hidden_field_tag 'member[role_ids][]', '' %>
26
        <p><%= submit_tag l(:button_change), :class => "small" %>
27
        <%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p>
28
    <% end %>
29
  </td>
30
  <td class="buttons">
31
      <%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
32
      <%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},                                              
33
                                              :method => :post,
34
                                              :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)
35
                                            }, :title => l(:button_delete),
36
                                               :class => 'icon icon-del') if member.deletable? %>
37
  </td>
38
	</tr>
39
<% end; reset_cycle %>
40
	</tbody>
41
</table>
42
<% else %>
43
<p class="nodata"><%= l(:label_no_data) %></p>
44
<% end %>
45

  
46
<% content_for :sidebar do %>
47
<% principals = Principal.active.find(:all, :limit => 100, :order => 'type, login, lastname ASC') - @project.principals %>
48

  
49
<% if roles.any? && principals.any? %>
50
  <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post,
51
									   :loading => '$(\'member-add-submit\').disable();',
52
									   :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %>
53
    <h3><%=l(:label_member_new)%></h3>
54
    
55
		<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
56
		<%= observe_field(:principal_search,
57
                 :frequency => 0.5,
58
                 :update => :principals,
59
                 :url => { :controller => 'members', :action => 'autocomplete_for_member', :id => @project },
60
                 :with => 'q')
61
                  %>
62

  
63
		<div id="principals">
64
		<% if params[:q] && params[:q].length > 1 %>
65
  		  <%= principals_check_box_tags 'member[user_ids][]', @principals %>
66
		<% end %>
67
		</div>
68
		
69
    <p><%= l(:label_set_role_plural) %>:</p>
70
    <% roles.each do |role| %>
71
    	<label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %> </label><div style="margin-left: 2em; margin-bottom: 0.5em"><i><%=l( 'label_' + role.name.downcase + "_description").to_sym %></i></div>
72
   	<% end %>
73
   	
74
    <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
75
  <% end %>
76
<% end %>
77
<% end %>
app/views/members/_editlist.html.erb
1
<%= error_messages_for 'member' %>
2

  
3
<% roles = Role.find_all_givable
4
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
5

  
6
<% if members.any? %>
7
<table class="list members">
8
	<thead><tr>
9
	  <th><%= l(:label_user) %></th>
10
	  <th><%= l(:label_role_plural) %></th>
11
          <th style="width:15%"></th>
12
	</tr></thead>
13
	<tbody>
14
	<% members.each do |member| %>
15
          <% next if member.new_record? %>
16
          <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
17
          <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
18
          <td class="roles">
19
            <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
20
            <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member},
21
      			 :method => :post, :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %>
22
            <p><% roles.each do |role| %>
23
              <label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
24
             <% end %></p>
25
        <%= hidden_field_tag 'member[role_ids][]', '' %>
26
        <p><%= submit_tag l(:button_change), :class => "small" %>
27
        <%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p>
28
    <% end %>
29
  </td>
30
  <td class="buttons">
31
      <%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
32
      <%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},                                              
33
                                              :method => :post,
34
                                              :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)
35
                                            }, :title => l(:button_delete),
36
                                               :class => 'icon icon-del') if member.deletable? %>
37
  </td>
38
	</tr>
39
<% end; reset_cycle %>
40
	</tbody>
41
</table>
42
<% else %>
43
<p class="nodata"><%= l(:label_no_data) %></p>
44
<% end %>
45

  
46
<% content_for :sidebar do %>
47
<% principals = Principal.active.find(:all, :limit => 100, :order => 'type, login, lastname ASC') - @project.principals %>
48

  
49
<% if roles.any? && principals.any? %>
50
  <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post,
51
									   :loading => '$(\'member-add-submit\').disable();',
52
									   :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %>
53
    <h3><%=l(:label_member_new)%></h3>
54
    
55
		<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
56
		<%= observe_field(:principal_search,
57
                 :frequency => 0.5,
58
                 :update => :principals,
59
                 :url => { :controller => 'members', :action => 'autocomplete_for_member', :id => @project },
60
                 :with => 'q')
61
                  %>
62

  
63
		<div id="principals">
64
		<% if params[:q] && params[:q].length > 1 %>
65
  		  <%= principals_check_box_tags 'member[user_ids][]', @principals %>
66
		<% end %>
67
		</div>
68
		
69
    <p><%= l(:label_set_role_plural) %>:</p>
70
    <% roles.each do |role| %>
71
    	<label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %> </label><div style="margin-left: 2em; margin-bottom: 0.5em"><i><%=l( 'label_' + role.name.downcase + "_description").to_sym %></i></div>
72
   	<% end %>
73
   	
74
    <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
75
  <% end %>
76
<% end %>
77
<% end %>
app/views/members/_list.erb
1

  
2
<% roles = Role.find_all_givable
3
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
4

  
5
<% if members.any? %>
6

  
7
<div id="members">
8
<dl>
9
<% members.each do |member| %>
10
<dt id="member-<%= member.id %>" class="member <%= member.principal.class.name.downcase %> <%= User.current.logged? && User.current == member.user ? 'me' : nil %>">
11
<%= avatar(member.user, :size => "24") %>
12
<span class="user"><%= link_to_user member.principal %></span>
13
<span class="email"><%= member.user.mail if !member.user.pref.hide_mail %></span>
14
<dd id="member-<%= member.id %>" class="roles <%= member.principal.class.name.downcase %> <%= User.current.logged? && User.current == member.user ? 'me' : nil %>">
15
<span class="roles" id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
16
</dd>
17
<% end %>
18
</dl>
19
<% else %>
20
<p class="nodata"><%= l(:label_no_data) %></p>
21
<% end %>
22
</div>
23

  
24
<% content_for :sidebar do %>
25
<% end %>
26

  
app/views/members/_list.html.erb
1

  
2
<% roles = Role.find_all_givable
3
   members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
4

  
5
<% if members.any? %>
6

  
7
<div id="members">
8
<dl>
9
<% members.each do |member| %>
10
<dt id="member-<%= member.id %>" class="member <%= member.principal.class.name.downcase %> <%= User.current.logged? && User.current == member.user ? 'me' : nil %>">
11
<%= avatar(member.user, :size => "24") %>
12
<span class="user"><%= link_to_user member.principal %></span>
13
<span class="email"><%= member.user.mail if !member.user.pref.hide_mail %></span>
14
<dd id="member-<%= member.id %>" class="roles <%= member.principal.class.name.downcase %> <%= User.current.logged? && User.current == member.user ? 'me' : nil %>">
15
<span class="roles" id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
16
</dd>
17
<% end %>
18
</dl>
19
<% else %>
20
<p class="nodata"><%= l(:label_no_data) %></p>
21
<% end %>
22
</div>
23

  
24
<% content_for :sidebar do %>
25
<% end %>
26

  
app/views/members/index.erb
1

  
2
<h2><%=l(:label_member_plural)%></h2> 
3

  
4
<% editable = authorize_for('members', 'edit') %>
5

  
6
<div id="memberlist">
7
<% if editable %>
8
<%= render :partial => 'editlist' %>
9
<% else %>
10
<%= render :partial => 'list' %>
11
<% end %>
12
</div>
13

  
app/views/members/index.html.erb
1

  
2
<h2><%=l(:label_member_plural)%></h2> 
3

  
4
<% editable = authorize_for('members', 'edit') %>
5

  
6
<div id="memberlist">
7
<% if editable %>
8
<%= render :partial => 'editlist' %>
9
<% else %>
10
<%= render :partial => 'list' %>
11
<% end %>
12
</div>
13

  
app/views/my/blocks/_activitymyprojects.erb
1

  
2
<%= render :partial => 'activities/recent', :locals => { :user => User.current } %>
3

  
4

  
app/views/my/blocks/_activitymyprojects.html.erb
1

  
2
<%= render :partial => 'activities/recent', :locals => { :user => User.current } %>
3

  
4

  
app/views/my/blocks/_tipoftheday.erb
1
    <h3><%=l(:label_tipoftheday)%></h3>
2
    <div class="tipoftheday box">
3
          <div class="tip"><%= textilizable Setting.tipoftheday_text %></div>
4
    </div>
app/views/my/blocks/_tipoftheday.html.erb
1
    <h3><%=l(:label_tipoftheday)%></h3>
2
    <div class="tipoftheday box">
3
          <div class="tip"><%= textilizable Setting.tipoftheday_text %></div>
4
    </div>
app/views/projects/settings/_overview.erb
1

  
2
<% form_for :project, @project,
3
            :url => { :action => 'overview', :id => @project },
4
            :html => {:id => 'overview-form'} do |f| %>
5

  
6
<div class="box tabular">
7

  
8
<p><%= l(:text_has_welcome_page_info, { :overview_link => link_to(l(:label_overview), { :controller => 'projects', :action => 'show' } ) } ) %></p>
9

  
10
<% if @project.module_enabled? :wiki %>
11

  
12
<p><%= link_to(l(:button_welcome_page_edit), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
13

  
14
<% else %>
15

  
16
<p><%= l(:text_has_welcome_page_wiki_disabled, { :modules_link => link_to(l(:label_module_plural), { :controller => 'projects', :action => 'settings', :tab => 'modules' } ) } ) %></p>
17

  
18
<% end %>
19

  
20
<p><label for="has_welcome_page"><%= l(:label_has_welcome_page) %></label>
21
<%= check_box_tag 'has_welcome_page', 1, @project.has_welcome_page? -%>
22
<br/><em><%= l(:setting_has_welcome_page) %></em>
23

  
24
</p>
25

  
26
</div>
27

  
28
<%= submit_tag l(:button_save) %>
29

  
30
<% end %>
app/views/projects/settings/_overview.html.erb
1

  
2
<% form_for :project, @project,
3
            :url => { :action => 'overview', :id => @project },
4
            :html => {:id => 'overview-form'} do |f| %>
5

  
6
<div class="box tabular">
7

  
8
<p><%= l(:text_has_welcome_page_info, { :overview_link => link_to(l(:label_overview), { :controller => 'projects', :action => 'show' } ) } ) %></p>
9

  
10
<% if @project.module_enabled? :wiki %>
11

  
12
<p><%= link_to(l(:button_welcome_page_edit), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
13

  
14
<% else %>
15

  
16
<p><%= l(:text_has_welcome_page_wiki_disabled, { :modules_link => link_to(l(:label_module_plural), { :controller => 'projects', :action => 'settings', :tab => 'modules' } ) } ) %></p>
17

  
18
<% end %>
19

  
20
<p><label for="has_welcome_page"><%= l(:label_has_welcome_page) %></label>
21
<%= check_box_tag 'has_welcome_page', 1, @project.has_welcome_page? -%>
22
<br/><em><%= l(:setting_has_welcome_page) %></em>
23

  
24
</p>
25

  
26
</div>
27

  
28
<%= submit_tag l(:button_save) %>
29

  
30
<% end %>
vendor/plugins/embedded/app/views/embedded/index.erb
1
<!-- Embedded page -->
2
<div class="embedded">
3
<%= @content %>
4
</div>
5
<!-- Embedded page end -->
6

  
7
<% html_title(@title) if @title %>
8

  
9
<% asset_include_tags(@doc_template) %>
vendor/plugins/embedded/app/views/embedded/index.html.erb
1
<!-- Embedded page -->
2
<div class="embedded">
3
<%= @content %>
4
</div>
5
<!-- Embedded page end -->
6

  
7
<% html_title(@title) if @title %>
8

  
9
<% asset_include_tags(@doc_template) %>
vendor/plugins/embedded/app/views/settings/_embedded.erb
1
<p><label>HTML directory</label>
2
<%= text_field_tag 'settings[path]', @settings['path'], :size => 80 %>
3
<br /><em>Use {PROJECT} to include the project identifier in the path</em></p>
4

  
5
<p><label>Index files</label>
6
<%= text_area_tag 'settings[index]', @settings['index'], :cols => 60, :rows => 3 %>
7
<br /><em>Space separated list of index files by priority</em></p>
8

  
9
<p><label>Valid extensions</label>
10
<%= text_area_tag 'settings[extensions]', @settings['extensions'], :cols => 60, :rows => 3 %>
11
<br /><em>Space separated list of file extensions that can be viewed (case insensitive)</em></p>
12

  
13
<p><label>Default template</label>
14
<%= select_tag 'settings[template]', options_for_select([''] + Redmine::Plugins::Embedded.available_templates, @settings['template']) %></p>
15

  
16
<p><label>Files encoding</label>
17
<%= text_field_tag 'settings[encoding]', @settings['encoding'] %>
18
<br /><em>Eg. ISO-8859-1<br />Leave this field empty if HTML files are UTF-8 encoded</em></p>
19

  
20
<p><label>Menu caption</label>
21
<%= text_field_tag 'settings[menu]', @settings['menu'], :size => 30 %>
22
<br /><em>Clear this field if you don't want to add a tab to the project menu</em></p>
vendor/plugins/embedded/app/views/settings/_embedded.html.erb
1
<p><label>HTML directory</label>
2
<%= text_field_tag 'settings[path]', @settings['path'], :size => 80 %>
3
<br /><em>Use {PROJECT} to include the project identifier in the path</em></p>
4

  
5
<p><label>Index files</label>
6
<%= text_area_tag 'settings[index]', @settings['index'], :cols => 60, :rows => 3 %>
7
<br /><em>Space separated list of index files by priority</em></p>
8

  
9
<p><label>Valid extensions</label>
10
<%= text_area_tag 'settings[extensions]', @settings['extensions'], :cols => 60, :rows => 3 %>
11
<br /><em>Space separated list of file extensions that can be viewed (case insensitive)</em></p>
12

  
13
<p><label>Default template</label>
14
<%= select_tag 'settings[template]', options_for_select([''] + Redmine::Plugins::Embedded.available_templates, @settings['template']) %></p>
15

  
16
<p><label>Files encoding</label>
17
<%= text_field_tag 'settings[encoding]', @settings['encoding'] %>
18
<br /><em>Eg. ISO-8859-1<br />Leave this field empty if HTML files are UTF-8 encoded</em></p>
19

  
20
<p><label>Menu caption</label>
21
<%= text_field_tag 'settings[menu]', @settings['menu'], :size => 30 %>
22
<br /><em>Clear this field if you don't want to add a tab to the project menu</em></p>
vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb
1
class <%= class_name %> < ActiveRecord::Migration
2
  def self.up
3
  <%- plugins.each do |plugin| -%>
4
    Engines.plugins["<%= plugin.name %>"].migrate(<%= new_versions[plugin.name] %>)
5
  <%- end -%>
6
  end
7

  
8
  def self.down
9
  <%- plugins.each do |plugin| -%>
10
    Engines.plugins["<%= plugin.name %>"].migrate(<%= current_versions[plugin.name] %>)
11
  <%- end -%>
12
  end
13
end
vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.html.erb
1
class <%= class_name %> < ActiveRecord::Migration
2
  def self.up
3
  <%- plugins.each do |plugin| -%>
4
    Engines.plugins["<%= plugin.name %>"].migrate(<%= new_versions[plugin.name] %>)
5
  <%- end -%>
6
  end
7

  
8
  def self.down
9
  <%- plugins.each do |plugin| -%>
10
    Engines.plugins["<%= plugin.name %>"].migrate(<%= current_versions[plugin.name] %>)
11
  <%- end -%>
12
  end
13
end
vendor/plugins/redmine_bibliography/app/views/projects/show.erb
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
    <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
105
    <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
106
    <h3><%= l(:label_spent_time) %></h3>
107
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
108
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
109
    <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>
110
    <% end %>
111
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
112
<% end %>
113

  
114
<% end %>
115

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

  
120
<% html_title(l(:label_overview)) -%>
vendor/plugins/redmine_bibliography/app/views/projects/show.html.erb
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
    <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
105
    <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
106
    <h3><%= l(:label_spent_time) %></h3>
107
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
108
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
109
    <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>
110
    <% end %>
111
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
112
<% end %>
113

  
114
<% end %>
115

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

  
120
<% html_title(l(:label_overview)) -%>
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 %>
vendor/plugins/redmine_bibliography/app/views/settings/_bibliography.erb
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/settings/_bibliography.html.erb
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.erb
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
        <span class="authors">
55
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
56
        </span>
57
        <span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %></span>
58
        <% if publication.bibtex_entry.year.to_s != "" %>
59
          <span class="year">
60
            &nbsp;(<%= publication.bibtex_entry.year %>)
61
          </span>
62
        <% end %>
63
      </dt>
64
      <dd>
65
      </dd>
66
  	<% end %>
67
  </div>
68
  <% end %>
69

  
70

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

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

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

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

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

  
104
<% html_title @user.name %>
vendor/plugins/redmine_bibliography/app/views/users/show.html.erb
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
        <span class="authors">
55
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
56
        </span>
57
        <span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %></span>
58
        <% if publication.bibtex_entry.year.to_s != "" %>
59
          <span class="year">
60
            &nbsp;(<%= publication.bibtex_entry.year %>)
61
          </span>
62
        <% end %>
63
      </dt>
64
      <dd>
65
      </dd>
66
  	<% end %>
67
  </div>
68
  <% end %>
69

  
70

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

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

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

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

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

  
104
<% html_title @user.name %>
vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout.erb
1
<p><%= form.select(:checkout_overwrite, [
2
    [l(:general_text_Yes), "1"],
3
    [l(:general_text_No), "0"]
4
  ],
5
  {},
6
  :onchange => <<-EOF
7
    Effect.toggle($('checkout_settings'), 'slide', {duration:0.2});
8
  EOF
9
  )%></p>
10

  
11
<div id="checkout_settings" <%= 'style="display:none;"' unless form.object.checkout_overwrite? %>><fieldset>
12
  <legend><%=l :label_checkout %></legend>
13
  
14
  <p><%= form.text_area :checkout_description, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p>
15
  <%= wikitoolbar_for 'repository_checkout_description' %>
16
  
17
  <% if form.object.scm_name == 'Subversion' %>
18
  <p><%= form.select :checkout_display_login,[
19
            [l(:label_display_login_none), ''],
20
            [l(:label_display_login_username), 'username'],
21
            [l(:label_display_login_password), 'password']
22
          ],
23
          :label => :setting_checkout_display_login %></p>
24
  <% end %>
25
  
26
  <p><%= form.check_box :checkout_display_command %></p>
27
  
28
  <% javascript_tag do %>
29
    protocolForm = new Subform(
30
      '<%= escape_javascript(render(:partial => "projects/settings/repository_checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => form.object.scm_name, :append_path => form.object.allow_subtree_checkout? ? 1: 0, :repository => form.object})})) %>',
31
      <%= form.object.checkout_protocols.length %>,
32
      'checkout_protocol_table'
33
    );
34
  <% end %>
35
  <p><label><%=l :label_protocol_plural %></label><%=l :help_repository_checkout_protocols %></p>
36
  <%= hidden_field_tag 'repository[checkout_protocols][-1][protocol]', 'empty' %>
37
  <table class="list checkout_protocol_table">
38
    <thead><tr>
39
      <th class="protocol_protocol"   ><%= l(:setting_protocol)%></th>
40
      <th class="protocol_command"    ><%= l(:setting_checkout_command)%></th>
41
      <th class="protocol_fixed_url"  ><%= l(:setting_checkout_fixed_url) %></th>
42
      <th class="protocol_access"     ><%= l(:label_permissions) %></th>
43
      <th class="protocol_append_path"><%= l(:label_append_path) %></th>
44
      <th class="protocol_is_default" ><%= l(:label_default) %></th>
45
      <th class="protocol_delete"     ></th>
46
    </tr></thead>
47
    <tbody id="checkout_protocol_table">
48
      <% form.object.checkout_protocols.each_with_index do |protocol, index| %>
49
        <%= render :partial => 'projects/settings/repository_checkout_protocol', :locals => {:protocol => protocol, :index => index, :classes => cycle('odd', 'even')} %>
50
      <% end %>
51
    </tbody>
52
  </table>
53
  <div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForm.add()", {:class => "icon icon-add"} %></div>
54
</fieldset></div>
vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout.html.erb
1
<p><%= form.select(:checkout_overwrite, [
2
    [l(:general_text_Yes), "1"],
3
    [l(:general_text_No), "0"]
4
  ],
5
  {},
6
  :onchange => <<-EOF
7
    Effect.toggle($('checkout_settings'), 'slide', {duration:0.2});
8
  EOF
9
  )%></p>
10

  
11
<div id="checkout_settings" <%= 'style="display:none;"' unless form.object.checkout_overwrite? %>><fieldset>
12
  <legend><%=l :label_checkout %></legend>
13
  
14
  <p><%= form.text_area :checkout_description, :cols => 60, :rows => 5, :class => 'wiki-edit', :label => :field_description %></p>
15
  <%= wikitoolbar_for 'repository_checkout_description' %>
16
  
17
  <% if form.object.scm_name == 'Subversion' %>
18
  <p><%= form.select :checkout_display_login,[
19
            [l(:label_display_login_none), ''],
20
            [l(:label_display_login_username), 'username'],
21
            [l(:label_display_login_password), 'password']
22
          ],
23
          :label => :setting_checkout_display_login %></p>
24
  <% end %>
25
  
26
  <p><%= form.check_box :checkout_display_command %></p>
27
  
28
  <% javascript_tag do %>
29
    protocolForm = new Subform(
30
      '<%= escape_javascript(render(:partial => "projects/settings/repository_checkout_protocol", :locals => {:protocol => Checkout::Protocol.new({:protocol => form.object.scm_name, :append_path => form.object.allow_subtree_checkout? ? 1: 0, :repository => form.object})})) %>',
31
      <%= form.object.checkout_protocols.length %>,
32
      'checkout_protocol_table'
33
    );
34
  <% end %>
35
  <p><label><%=l :label_protocol_plural %></label><%=l :help_repository_checkout_protocols %></p>
36
  <%= hidden_field_tag 'repository[checkout_protocols][-1][protocol]', 'empty' %>
37
  <table class="list checkout_protocol_table">
38
    <thead><tr>
39
      <th class="protocol_protocol"   ><%= l(:setting_protocol)%></th>
40
      <th class="protocol_command"    ><%= l(:setting_checkout_command)%></th>
41
      <th class="protocol_fixed_url"  ><%= l(:setting_checkout_fixed_url) %></th>
42
      <th class="protocol_access"     ><%= l(:label_permissions) %></th>
43
      <th class="protocol_append_path"><%= l(:label_append_path) %></th>
44
      <th class="protocol_is_default" ><%= l(:label_default) %></th>
45
      <th class="protocol_delete"     ></th>
46
    </tr></thead>
47
    <tbody id="checkout_protocol_table">
48
      <% form.object.checkout_protocols.each_with_index do |protocol, index| %>
49
        <%= render :partial => 'projects/settings/repository_checkout_protocol', :locals => {:protocol => protocol, :index => index, :classes => cycle('odd', 'even')} %>
50
      <% end %>
51
    </tbody>
52
  </table>
53
  <div style="text-align: right"><%= link_to_function l(:button_add_protocol), "protocolForm.add()", {:class => "icon icon-add"} %></div>
54
</fieldset></div>
vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout_protocol.erb
1
<%
2
  index ||= "--INDEX--"
3
  classes ||= ""
4
  
5
  protocol = Checkout::Protocol.new(protocol) unless protocol.is_a? Checkout::Protocol
6
%>
7
<tr id="<%= "checkout_protocols_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
8
  <td class="protocol_protocol"><%= text_field_tag "repository[checkout_protocols][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
9
  <td class="protocol_command"><%= text_field_tag "repository[checkout_protocols][#{index}][command]", protocol.command, :size => 15 %></td>
10
  <td class="protocol_fixed_url"><%= text_field_tag "repository[checkout_protocols][#{index}][fixed_url]", protocol.fixed_url, :size => 60 %></td>
11
  <td class="protocol_access"><%= select_tag "repository[checkout_protocols][#{index}][access]", options_for_select([
12
    [l(:label_access_read_write), 'read+write'],
13
    [l(:label_access_read_only), 'read-only'],
14
    [l(:label_access_permission), 'permission']], protocol.access) %></td>
15
  <td class="protocol_append_path"><%= check_box_tag "repository[checkout_protocols][#{index}][append_path]", 1, protocol.append_path? %></td>
16
  <td class="protocol_is_default"><%= check_box_tag "repository[checkout_protocols][#{index}][is_default]", 1, protocol.default? %></td>
17
  <td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
18
</tr>
vendor/plugins/redmine_checkout/app/views/projects/settings/_repository_checkout_protocol.html.erb
1
<%
2
  index ||= "--INDEX--"
3
  classes ||= ""
4
  
5
  protocol = Checkout::Protocol.new(protocol) unless protocol.is_a? Checkout::Protocol
6
%>
7
<tr id="<%= "checkout_protocols_#{index}" %>" class="<%= classes %>" <%= 'style="display:none"' if index == '--INDEX--' %>>
8
  <td class="protocol_protocol"><%= text_field_tag "repository[checkout_protocols][#{index}][protocol]", protocol.protocol, :size => 10 %></td>
9
  <td class="protocol_command"><%= text_field_tag "repository[checkout_protocols][#{index}][command]", protocol.command, :size => 15 %></td>
10
  <td class="protocol_fixed_url"><%= text_field_tag "repository[checkout_protocols][#{index}][fixed_url]", protocol.fixed_url, :size => 60 %></td>
11
  <td class="protocol_access"><%= select_tag "repository[checkout_protocols][#{index}][access]", options_for_select([
12
    [l(:label_access_read_write), 'read+write'],
13
    [l(:label_access_read_only), 'read-only'],
14
    [l(:label_access_permission), 'permission']], protocol.access) %></td>
15
  <td class="protocol_append_path"><%= check_box_tag "repository[checkout_protocols][#{index}][append_path]", 1, protocol.append_path? %></td>
16
  <td class="protocol_is_default"><%= check_box_tag "repository[checkout_protocols][#{index}][is_default]", 1, protocol.default? %></td>
17
  <td class="protocol_delete"><%= image_to_function 'delete.png', "var e=$('checkout_protocols_#{index}');var parent=e.up(\"tbody\");e.remove();recalculate_even_odd(parent);return false" %></td>
18
</tr>
vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.erb
1
<div class="repository-info">
2
  <% if repository.checkout_description.present? %>
3
  <div class="wiki<%= ' bottomline' if protocols.present? %>"><%= textilizable repository.checkout_description %></div>
4
  <% end %>
5
  <% if protocols.present? %>
6
  <div id="checkout_box">
7
    <ul id="checkout_protocols">
8
    <% protocols.each do |p| -%>
9
      <li>
10
        <a <%= 'class="selected"' if p == default_protocol %> id="checkout_protocol_<%= p.protocol.to_s.underscore %>" data-permission="<%= p.access_rw(User.current) %>" href="<%= URI.escape p.url(checkout_path) %>"><%=h p.protocol %></a>
11
      </li>
12
    <% end -%>
13
    </ul>
14
    <%= text_field_tag :checkout_url, h(default_protocol.full_command(checkout_path)), :readonly => true %>
15
    <%- if Setting.checkout_use_zero_clipboard? %>
16
    <div id="clipboard_container" title="<%= l(:label_copy_to_clipboard) %>" style="display: none;">
17
       <div id="clipboard_button"><%= image_tag 'paste.png', :plugin => 'redmine_checkout' %></div>
18
    </div>
19
    <% end -%>
20

  
21
    <p>
22
    <% if User.current.logged? %>
23
      <% if repository.is_external? %>
24
      <%=l :label_access_type_all, :type => l(:label_access_read_only) %>
25
      <% else %>
26
      <% if default_protocol %><%=l :label_access_type, :type => l(default_protocol.access_label(User.current)) %><% end %>
27
      <% end %>
28
    <% else %>
29
      &nbsp;
30
    <% end %>
31
    </p>
32

  
33
    <% javascript_tag do %>
34
      var checkout_access   = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{l(p.access_label(User.current))}'"}.join(', ') %>});
35
      var checkout_commands = $H({<%= protocols.inject([]){|r,p| r << "'checkout_protocol_#{p.protocol.to_s.underscore}': '#{escape_javascript(p.full_command(checkout_path))}'"}.join(', ') %>});
36
      <%- if Setting.checkout_use_zero_clipboard? %>ZeroClipboard.setMoviePath( '<%= image_path('ZeroClipboard.swf', :plugin => 'redmine_checkout') %>' );<% end %>
37
    <% end %>
38
  </div>
39
  <% end%>
40
  <% if repository.is_external? %>
41
    <div style="clear: left">
42
    </div>
43
    <p class="topline" style="padding-top: 1em"><%= l(:text_repository_external, :location => repository.external_url) %></p>
44
  <% end %>
45
</div>
46
<div style="clear: left"></div>
47

  
48
<% content_for :header_tags do %>
49
  <%= stylesheet_link_tag 'checkout', :plugin => 'redmine_checkout' %>
50
  <%= javascript_include_tag 'checkout', :plugin => 'redmine_checkout' %>
51
  <%= (javascript_include_tag 'ZeroClipboard', :plugin => 'redmine_checkout') if Setting.checkout_use_zero_clipboard? %>
52
<% end %>
vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.html.erb
1
<div class="repository-info">
2
  <% if repository.checkout_description.present? %>
3
  <div class="wiki<%= ' bottomline' if protocols.present? %>"><%= textilizable repository.checkout_description %></div>
4
  <% end %>
5
  <% if protocols.present? %>
6
  <div id="checkout_box">
7
    <ul id="checkout_protocols">
8
    <% protocols.each do |p| -%>
9
      <li>
10
        <a <%= 'class="selected"' if p == default_protocol %> id="checkout_protocol_<%= p.protocol.to_s.underscore %>" data-permission="<%= p.access_rw(User.current) %>" href="<%= URI.escape p.url(checkout_path) %>"><%=h p.protocol %></a>
11
      </li>
12
    <% end -%>
13
    </ul>
14
    <%= text_field_tag :checkout_url, h(default_protocol.full_command(checkout_path)), :readonly => true %>
15
    <%- if Setting.checkout_use_zero_clipboard? %>
16
    <div id="clipboard_container" title="<%= l(:label_copy_to_clipboard) %>" style="display: none;">
17
       <div id="clipboard_button"><%= image_tag 'paste.png', :plugin => 'redmine_checkout' %></div>
18
    </div>
19
    <% end -%>
20

  
21
    <p>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff