Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
<div id="user_form">
|
||||
<!--[form:user]-->
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<fieldset class="box tabular">
|
||||
<legend><%=l(:label_information_plural)%></legend>
|
||||
|
@ -30,8 +31,13 @@
|
|||
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {$('#password_fields').show();} else {$('#password_fields').hide();}" %></p>
|
||||
<% end %>
|
||||
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
|
||||
<p><%= f.password_field :password, :required => true, :size => 25 %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
||||
<p>
|
||||
<%= f.password_field :password, :required => true, :size => 25 %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
||||
<% if Setting.password_required_char_classes.any? %>
|
||||
<em class="info"><%= l(:text_characters_must_contain, :character_classes => Setting.password_required_char_classes.collect{|c| l("label_password_char_class_#{c}")}.join(", ")) %></em>
|
||||
<% end %>
|
||||
</p>
|
||||
<p><%= f.password_field :password_confirmation, :required => true, :size => 25 %></p>
|
||||
<p><%= f.check_box :generate_password %></p>
|
||||
<p><%= f.check_box :must_change_passwd %></p>
|
||||
|
@ -52,6 +58,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:left;"></div>
|
||||
<!--[eoform:user]-->
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
:onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
|
||||
) %>
|
||||
</p>
|
||||
<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
|
||||
<%= content_tag 'fieldset', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
|
||||
<legend><%= toggle_checkboxes_link("#notified-projects input[type=checkbox]") %><%=l(:label_project_plural)%></legend>
|
||||
<%= render_project_nested_lists(@user.projects) do |project|
|
||||
content_tag('label',
|
||||
check_box_tag(
|
||||
|
|
|
@ -4,4 +4,6 @@
|
|||
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
|
||||
<p><%= pref_fields.check_box :warn_on_leaving_unsaved %></p>
|
||||
<p><%= pref_fields.select :textarea_font, textarea_font_options %></p>
|
||||
<p><%= pref_fields.text_field :recently_used_projects, :size => 2 %></p>
|
||||
<p><%= pref_fields.select :history_default_tab, history_default_tab_options %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<%= delete_link user_path(@user) if User.current != @user %>
|
||||
</div>
|
||||
|
||||
<%= title [l(:label_user_plural), users_path], @user.login %>
|
||||
<%=
|
||||
page_title = title [l(:label_user_plural), users_path], @user.login
|
||||
page_title.insert(page_title.rindex(' ') + 1, avatar(@user))
|
||||
%>
|
||||
|
||||
<%= render_tabs user_settings_tabs %>
|
||||
|
|
|
@ -3,6 +3,7 @@ api.array :users, api_meta(:total_count => @user_count, :offset => @offset, :lim
|
|||
api.user do
|
||||
api.id user.id
|
||||
api.login user.login
|
||||
api.admin user.admin?
|
||||
api.firstname user.firstname
|
||||
api.lastname user.lastname
|
||||
api.mail user.mail
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<h2><%=l(:label_user_plural)%></h2>
|
||||
|
||||
<%= form_tag(users_path, :method => :get) do %>
|
||||
<%= form_tag(users_path, { :method => :get, :id => 'users_form' }) do %>
|
||||
<fieldset><legend><%= l(:label_filter_plural) %></legend>
|
||||
<label for='status'><%= l(:field_status) %>:</label>
|
||||
<%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
||||
|
@ -19,6 +19,7 @@
|
|||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<%= hidden_field_tag 'encoding', l(:general_csv_encoding) unless l(:general_csv_encoding).casecmp('UTF-8') == 0 %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
@ -55,6 +56,27 @@
|
|||
</table>
|
||||
</div>
|
||||
<span class="pagination"><%= pagination_links_full @user_pages, @user_count %></span>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
||||
<% end %>
|
||||
<div id="csv-export-options" style="display: none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= export_csv_encoding_select_tag %>
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :id => 'csv-export-button' %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => 'hideModal(this);', :type => 'button' %>
|
||||
</p>
|
||||
</div>
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function(){
|
||||
$('input#csv-export-button').click(function(){
|
||||
$('form input#encoding').val($('select#encoding option:selected').val());
|
||||
$('form#users_form').attr('action', "<%= users_path(:format => 'csv') %>").submit();
|
||||
$('form#users_form').attr('action', '<%= users_path %>');
|
||||
hideModal(this);
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
$('input#user_mail').val(ui.item.mail);
|
||||
$('select#user_auth_source_id option').each(function(){
|
||||
if ($(this).attr('value') == ui.item.auth_source_id) {
|
||||
$(this).attr('selected', true);
|
||||
$(this).prop('selected', true);
|
||||
$('select#user_auth_source_id').trigger('change');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
api.user do
|
||||
api.id @user.id
|
||||
api.login @user.login if User.current.admin? || (User.current == @user)
|
||||
api.login @user.login
|
||||
api.admin @user.admin? if User.current.admin? || (User.current == @user)
|
||||
api.firstname @user.firstname
|
||||
api.lastname @user.lastname
|
||||
api.mail @user.mail if User.current.admin? || !@user.pref.hide_mail
|
||||
|
@ -28,7 +29,7 @@ api.user do
|
|||
attrs = {:id => member_role.role.id, :name => member_role.role.name}
|
||||
attrs.merge!(:inherited => true) if member_role.inherited_from.present?
|
||||
api.role attrs
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end if membership.project
|
||||
|
|
|
@ -4,17 +4,16 @@
|
|||
|
||||
<h2><%= avatar @user, :size => "50" %> <%= @user.name %></h2>
|
||||
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<ul>
|
||||
<% if User.current.admin? %>
|
||||
<li><%=l(:field_login)%>: <%= @user.login %></li>
|
||||
<% end %>
|
||||
<li><%=l(:field_login)%>: <%= @user.login %></li>
|
||||
<% unless @user.pref.hide_mail %>
|
||||
<li><%=l(:field_mail)%>: <%= mail_to(@user.mail, nil, :encode => 'javascript') %></li>
|
||||
<% end %>
|
||||
<% @user.visible_custom_field_values.each do |custom_value| %>
|
||||
<% if !custom_value.value.blank? %>
|
||||
<li><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
|
||||
<li class="<%= custom_value.custom_field.css_classes %>"><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
|
||||
|
@ -24,24 +23,93 @@
|
|||
</ul>
|
||||
|
||||
<h3><%=l(:label_issue_plural)%></h3>
|
||||
<ul>
|
||||
<li><%= link_to l(:label_assigned_issues),
|
||||
issues_path(:set_filter => 1, :assigned_to_id => ([@user.id] + @user.group_ids).join("|"), :sort => 'priority:desc,updated_on:desc') %>:
|
||||
<%= Issue.visible.open.assigned_to(@user).count %>
|
||||
<li><%= link_to l(:label_reported_issues),
|
||||
issues_path(:set_filter => 1, :status_id => '*', :author_id => @user.id) %>:
|
||||
<%= Issue.visible.where(:author_id => @user.id).count %>
|
||||
</ul>
|
||||
|
||||
<table class="list issue-report">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%=l(:label_open_issues_plural)%></th>
|
||||
<th><%=l(:label_closed_issues_plural)%></th>
|
||||
<th><%=l(:label_total)%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% assigned_to_ids = ([@user.id] + @user.group_ids).join("|") %>
|
||||
<% sort_cond = 'priority:desc,updated_on:desc' %>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= link_to l(:label_assigned_issues),
|
||||
issues_path(:set_filter => 1, :assigned_to_id => assigned_to_ids, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @issue_counts[:assigned][:open],
|
||||
issues_path(:set_filter => 1, :assigned_to_id => assigned_to_ids, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @issue_counts[:assigned][:total] - @issue_counts[:assigned][:open],
|
||||
issues_path(:set_filter => 1, :status_id => 'c', :assigned_to_id => assigned_to_ids, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td class="total">
|
||||
<%= link_to @issue_counts[:assigned][:total],
|
||||
issues_path(:set_filter => 1, :status_id => '*', :assigned_to_id => assigned_to_ids, :sort => sort_cond) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= link_to l(:label_reported_issues),
|
||||
issues_path(:set_filter => 1, :author_id => @user.id, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @issue_counts[:reported][:open],
|
||||
issues_path(:set_filter => 1, :author_id => @user.id, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to @issue_counts[:reported][:total] - @issue_counts[:reported][:open],
|
||||
issues_path(:set_filter => 1, :status_id => 'c', :author_id => @user.id, :sort => sort_cond) %>
|
||||
</td>
|
||||
<td class="total">
|
||||
<%= link_to @issue_counts[:reported][:total],
|
||||
issues_path(:set_filter => 1, :status_id => '*', :author_id => @user.id, :sort => sort_cond) %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% unless @memberships.empty? %>
|
||||
<h3><%=l(:label_project_plural)%></h3>
|
||||
<ul>
|
||||
<% for membership in @memberships %>
|
||||
<li><%= link_to_project(membership.project) %>
|
||||
(<%= membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li>
|
||||
<table class="list projects">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%=l(:label_project)%></th>
|
||||
<th><%=l(:label_role_plural)%></th>
|
||||
<th><%=l(:label_registered_on)%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% memberships_by_project = @memberships.group_by(&:project) %>
|
||||
<% project_tree(memberships_by_project.keys, :init_level => true) do |project, level| %>
|
||||
<% membership = memberships_by_project[project].first %>
|
||||
<tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td class="name"><span><%= link_to_project(project) %></span></td>
|
||||
<td class="roles"><%= membership.roles.sort.collect(&:to_s).join(', ') %></td>
|
||||
<td><%= format_date(membership.created_on) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<% if (User.current == @user || User.current.admin?) && @user.groups.any? %>
|
||||
<div id="groups">
|
||||
<h3><%=l(:label_group_plural)%></h3>
|
||||
<ul>
|
||||
<% for group in @user.groups %>
|
||||
<li><%= link_to_group(group) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook :view_account_left_bottom, :user => @user %>
|
||||
</div>
|
||||
|
||||
|
@ -51,21 +119,7 @@
|
|||
<h3><%= link_to l(:label_activity), :controller => 'activities',
|
||||
:action => 'index', :id => nil, :user_id => @user,
|
||||
:from => @events_by_day.keys.first %></h3>
|
||||
|
||||
<div id="activity">
|
||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||
<h4><%= format_activity_day(day) %></h4>
|
||||
<dl>
|
||||
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
|
||||
<dt class="<%= e.event_type %>">
|
||||
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
||||
<%= content_tag('span', e.project, :class => 'project') %>
|
||||
<%= link_to format_activity_title(e.event_title), e.event_url %></dt>
|
||||
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
|
||||
<% end -%>
|
||||
</dl>
|
||||
<% end -%>
|
||||
</div>
|
||||
<%= render :partial => 'activities/activities', :locals => {:events_by_day => @events_by_day} %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
|
||||
|
@ -77,5 +131,5 @@
|
|||
<% end %>
|
||||
<%= call_hook :view_account_right_bottom, :user => @user %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% html_title @user.name %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue