Redmine 3.4.4

This commit is contained in:
Manuel Cillero 2018-02-02 22:19:29 +01:00
commit 64924a6376
2112 changed files with 259028 additions and 0 deletions

View 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 %>

View 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)) -%>

View 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) %>");

View file

@ -0,0 +1,3 @@
<h3><%= l(:label_calendar) %></h3>
<%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>

View file

@ -0,0 +1,3 @@
<h3><%=l(:label_document_plural)%></h3>
<%= render :partial => 'documents/document', :collection => documents %>

View 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>

View 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 %>

View file

@ -0,0 +1,3 @@
<h3><%=l(:label_news_latest)%></h3>
<%= render :partial => 'news/news', :collection => news %>

View 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 %>

View 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>

View 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)) -%>

View 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 %>

View file

@ -0,0 +1,2 @@
$("#block-<%= escape_javascript @block %>").remove();
$("#block-select").replaceWith("<%= escape_javascript block_select_tag(@user) %>");

View 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>

View file

@ -0,0 +1 @@
$('#api-access-key').html('<%= escape_javascript @user.api_key %>').toggle();

View file

@ -0,0 +1,3 @@
<% @updated_blocks.each do |block| %>
$("#block-<%= block %>").replaceWith("<%= escape_javascript render_block(block.to_s, @user) %>");
<% end %>