Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
36
app/views/my/_sidebar.html.erb
Normal file
36
app/views/my/_sidebar.html.erb
Normal file
|
@ -0,0 +1,36 @@
|
|||
<h3><%=l(:label_my_account)%></h3>
|
||||
|
||||
<p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
||||
|
||||
<% if @user.own_account_deletable? %>
|
||||
<p><%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %></p>
|
||||
<% end %>
|
||||
|
||||
<h4><%= l(:label_feeds_access_key) %></h4>
|
||||
|
||||
<p>
|
||||
<% if @user.rss_token %>
|
||||
<%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
|
||||
<% else %>
|
||||
<%= l(:label_missing_feeds_access_key) %>
|
||||
<% end %>
|
||||
(<%= link_to l(:button_reset), my_rss_key_path, :method => :post %>)
|
||||
</p>
|
||||
|
||||
<% if Setting.rest_api_enabled? %>
|
||||
<h4><%= l(:label_api_access_key) %></h4>
|
||||
<div>
|
||||
<%= link_to l(:button_show), my_api_key_path, :remote => true %>
|
||||
<pre id='api-access-key' class='autoscroll'></pre>
|
||||
</div>
|
||||
<%= javascript_tag("$('#api-access-key').hide();") %>
|
||||
<p>
|
||||
<% if @user.api_token %>
|
||||
<%= l(:label_api_access_key_created_on, distance_of_time_in_words(Time.now, @user.api_token.created_on)) %>
|
||||
<% else %>
|
||||
<%= l(:label_missing_api_access_key) %>
|
||||
<% end %>
|
||||
(<%= link_to l(:button_reset), my_api_key_path, :method => :post %>)
|
||||
</p>
|
||||
<% end %>
|
60
app/views/my/account.html.erb
Normal file
60
app/views/my/account.html.erb
Normal file
|
@ -0,0 +1,60 @@
|
|||
<div class="contextual">
|
||||
<%= additional_emails_link(@user) %>
|
||||
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||||
<%= call_hook(:view_my_account_contextual, :user => @user)%>
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<%= avatar_edit_link(@user, :size => "50") %>
|
||||
<%=l(:label_my_account)%>
|
||||
</h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<%= labelled_form_for :user, @user,
|
||||
:url => { :action => "account" },
|
||||
:html => { :id => 'my_account_form',
|
||||
:method => :post, :multipart => true } do |f| %>
|
||||
<div class="splitcontentleft">
|
||||
<fieldset class="box tabular">
|
||||
<legend><%=l(:label_information_plural)%></legend>
|
||||
<p><%= f.text_field :firstname, :required => true %></p>
|
||||
<p><%= f.text_field :lastname, :required => true %></p>
|
||||
<p><%= f.text_field :mail, :required => true %></p>
|
||||
<% unless @user.force_default_language? %>
|
||||
<p><%= f.select :language, lang_options_for_select %></p>
|
||||
<% end %>
|
||||
<% if Setting.openid? %>
|
||||
<p><%= f.text_field :identity_url %></p>
|
||||
<% end %>
|
||||
|
||||
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :user, value %></p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
|
||||
</fieldset>
|
||||
|
||||
<p class="mobile-hide"><%= submit_tag l(:button_save) %></p>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<fieldset class="box">
|
||||
<legend><%=l(:field_mail_notification)%></legend>
|
||||
<%= render :partial => 'users/mail_notifications' %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box tabular">
|
||||
<legend><%=l(:label_preferences)%></legend>
|
||||
<%= render :partial => 'users/preferences' %>
|
||||
<%= call_hook(:view_my_account_preferences, :user => @user, :form => f) %>
|
||||
</fieldset>
|
||||
|
||||
<p class="mobile-show"><%= submit_tag l(:button_save) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_my_account)) -%>
|
3
app/views/my/add_block.js.erb
Normal file
3
app/views/my/add_block.js.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
$("#block-<%= escape_javascript @block %>").remove();
|
||||
$("#list-top").prepend("<%= escape_javascript render_blocks([@block], @user) %>");
|
||||
$("#block-select").replaceWith("<%= escape_javascript block_select_tag(@user) %>");
|
3
app/views/my/blocks/_calendar.html.erb
Normal file
3
app/views/my/blocks/_calendar.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h3><%= l(:label_calendar) %></h3>
|
||||
|
||||
<%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>
|
3
app/views/my/blocks/_documents.html.erb
Normal file
3
app/views/my/blocks/_documents.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h3><%=l(:label_document_plural)%></h3>
|
||||
|
||||
<%= render :partial => 'documents/document', :collection => documents %>
|
19
app/views/my/blocks/_issue_query_selection.html.erb
Normal file
19
app/views/my/blocks/_issue_query_selection.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<h3>
|
||||
<%= l(:label_issue_plural) %>
|
||||
</h3>
|
||||
|
||||
<div id="<%= block %>-settings">
|
||||
<%= form_tag(my_page_path, :remote => true) do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<label>
|
||||
<%= l(:label_query) %>
|
||||
<%= select_tag "settings[#{block}][query_id]", content_tag("option") + options_from_collection_for_select(queries, :id, :name, settings[:query_id]) %>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
41
app/views/my/blocks/_issues.erb
Normal file
41
app/views/my/blocks/_issues.erb
Normal file
|
@ -0,0 +1,41 @@
|
|||
<div class="contextual">
|
||||
<%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%= "#{query.project} |" if query.project %>
|
||||
<%= link_to query.name, _project_issues_path(query.project, query.as_params) %>
|
||||
(<%= query.issue_count %>)
|
||||
</h3>
|
||||
|
||||
<div id="<%= block %>-settings" style="display:none;">
|
||||
<%= form_tag(my_page_path, :remote => true) do %>
|
||||
<div class="box">
|
||||
<%= render_query_columns_selection(query, :name => "settings[#{block}][columns]") %>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if issues.any? %>
|
||||
<%= render :partial => 'issues/list',
|
||||
:locals => {
|
||||
:issues => issues,
|
||||
:query => query,
|
||||
:query_options => {
|
||||
:sort_param => "settings[#{block}][sort]",
|
||||
:sort_link_options => {:method => :post, :remote => true}
|
||||
}
|
||||
} %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
_project_issues_path(query.project, query.as_params.merge(:format => 'atom', :key => User.current.rss_key)),
|
||||
{:title => query.name}) %>
|
||||
<% end %>
|
3
app/views/my/blocks/_news.html.erb
Normal file
3
app/views/my/blocks/_news.html.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<h3><%=l(:label_news_latest)%></h3>
|
||||
|
||||
<%= render :partial => 'news/news', :collection => news %>
|
63
app/views/my/blocks/_timelog.html.erb
Normal file
63
app/views/my/blocks/_timelog.html.erb
Normal file
|
@ -0,0 +1,63 @@
|
|||
<div class="contextual">
|
||||
<%= link_to_function l(:label_options), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
|
||||
(<%= l(:label_last_n_days, days) %>: <%= l_hours_short entries.sum(&:hours) %>)
|
||||
<%= link_to l(:button_log_time), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %>
|
||||
</h3>
|
||||
|
||||
|
||||
<div id="timelog-settings" style="display:none;">
|
||||
<%= form_tag(my_page_path, :remote => true) do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<label>
|
||||
<%= l(:button_show) %>:
|
||||
<%= text_field_tag 'settings[timelog][days]', days, :size => 6 %>
|
||||
<%= l(:label_day_plural) %>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= link_to_function l(:button_cancel), "$('#timelog-settings').toggle();" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if entries.any? %>
|
||||
<%= form_tag({}, :data => {:cm_url => time_entries_context_menu_path}) do %>
|
||||
<table class="list time-entries odd-even">
|
||||
<thead><tr>
|
||||
<th><%= l(:label_activity) %></th>
|
||||
<th><%= l(:label_project) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
<th><%= l(:field_hours) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% entries_by_day.keys.sort.reverse.each do |day| %>
|
||||
<tr class="odd">
|
||||
<td><strong><%= day == User.current.today ? l(:label_today).titleize : format_date(day) %></strong></td>
|
||||
<td colspan="2"></td>
|
||||
<td class="hours"><em><%= html_hours(format_hours(entries_by_day[day].sum(&:hours))) %></em></td>
|
||||
</tr>
|
||||
<% entries_by_day[day].each do |entry| -%>
|
||||
<tr id="time-entry-<%= entry.id %>" class="time-entry hascontextmenu">
|
||||
<td class="activity">
|
||||
<%= check_box_tag("ids[]", entry.id, false, :style => 'display:none;', :id => nil) %>
|
||||
<%= entry.activity %>
|
||||
</td>
|
||||
<td class="subject"><%= entry.project %> <%= h(' - ') + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td>
|
||||
<td class="comments"><%= entry.comments %></td>
|
||||
<td class="hours"><%= html_hours(format_hours(entry.hours)) %></td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
11
app/views/my/destroy.html.erb
Normal file
11
app/views/my/destroy.html.erb
Normal file
|
@ -0,0 +1,11 @@
|
|||
<h2><%=l(:label_confirmation)%></h2>
|
||||
<div class="warning">
|
||||
<p><%= simple_format l(:text_account_destroy_confirmation)%></p>
|
||||
<p>
|
||||
<%= form_tag({}) do %>
|
||||
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
|
||||
<%= submit_tag l(:button_delete_my_account) %> |
|
||||
<%= link_to l(:button_cancel), :action => 'account' %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
46
app/views/my/page.html.erb
Normal file
46
app/views/my/page.html.erb
Normal file
|
@ -0,0 +1,46 @@
|
|||
<div class="contextual">
|
||||
<%= form_tag({:action => "add_block"}, :remote => true, :id => "block-form") do %>
|
||||
<%= label_tag('block-select', l(:button_add)) %>:
|
||||
<%= block_select_tag(@user) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_my_page)%></h2>
|
||||
|
||||
<div id="my-page">
|
||||
<% @groups.each do |group| %>
|
||||
<div id="list-<%= group %>" class="block-receiver">
|
||||
<%= render_blocks(@blocks[group], @user) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= context_menu %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function(){
|
||||
$('#block-select').val('');
|
||||
$('.block-receiver').sortable({
|
||||
connectWith: '.block-receiver',
|
||||
tolerance: 'pointer',
|
||||
handle: '.sort-handle',
|
||||
start: function(event, ui){$(this).parent().addClass('dragging');},
|
||||
stop: function(event, ui){$(this).parent().removeClass('dragging');},
|
||||
update: function(event, ui){
|
||||
// trigger the call on the list that receives the block only
|
||||
if ($(this).find(ui.item).length > 0) {
|
||||
$.ajax({
|
||||
url: "<%= escape_javascript url_for(:action => "order_blocks") %>",
|
||||
type: 'post',
|
||||
data: {
|
||||
'group': $(this).attr('id').replace(/^list-/, ''),
|
||||
'blocks': $.map($(this).children(), function(el){return $(el).attr('id').replace(/^block-/, '');})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_my_page)) -%>
|
24
app/views/my/password.html.erb
Normal file
24
app/views/my/password.html.erb
Normal file
|
@ -0,0 +1,24 @@
|
|||
<h2><%=l(:button_change_password)%></h2>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<%= form_tag({}, :class => "tabular") do %>
|
||||
<div class="box">
|
||||
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||
|
||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password', nil, :size => 25 %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
||||
|
||||
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_apply) %>
|
||||
<% end %>
|
||||
|
||||
<% unless @user.must_change_password? %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
<% end %>
|
2
app/views/my/remove_block.js.erb
Normal file
2
app/views/my/remove_block.js.erb
Normal file
|
@ -0,0 +1,2 @@
|
|||
$("#block-<%= escape_javascript @block %>").remove();
|
||||
$("#block-select").replaceWith("<%= escape_javascript block_select_tag(@user) %>");
|
7
app/views/my/show_api_key.html.erb
Normal file
7
app/views/my/show_api_key.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<h2><%= l :label_api_access_key %></h2>
|
||||
|
||||
<div class="box">
|
||||
<pre><%= @user.api_key %></pre>
|
||||
</div>
|
||||
|
||||
<p><%= link_to l(:button_back), action: 'account' %></p>
|
1
app/views/my/show_api_key.js.erb
Normal file
1
app/views/my/show_api_key.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#api-access-key').html('<%= escape_javascript @user.api_key %>').toggle();
|
3
app/views/my/update_page.js.erb
Normal file
3
app/views/my/update_page.js.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<% @updated_blocks.each do |block| %>
|
||||
$("#block-<%= block %>").replaceWith("<%= escape_javascript render_block(block.to_s, @user) %>");
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue