parent
26a1050f8f
commit
7e573bbc66
@ -1,139 +0,0 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See docs/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
jQuery(document).ready(function($) { |
||||
|
||||
// Add block
|
||||
$('.my-page--block-form').submit(function (evt) { |
||||
var form = $(this); |
||||
var block = $('#block-options').val(); |
||||
evt.preventDefault(); |
||||
|
||||
jQuery |
||||
.ajax( |
||||
{ |
||||
url: form.attr('action'), |
||||
type: 'POST', |
||||
dataType: 'html', |
||||
data: { |
||||
block: block |
||||
} |
||||
}) |
||||
.fail(function(error, text) { |
||||
jQuery(window).trigger( |
||||
'op:notifications:add', |
||||
{ |
||||
type: 'error', |
||||
message: I18n.t('js.error.cannot_save_changes_with_message', { error: _.get(error, 'responseText', 'Internal error') }) |
||||
} |
||||
); |
||||
}) |
||||
.done(function(response) { |
||||
// Add partial to the top container.
|
||||
jQuery("#top").prepend(response); |
||||
|
||||
// Revert options selection back to the default one.
|
||||
jQuery('#block-options option').first().prop('selected', true); |
||||
|
||||
// Disable the option for this block in the blocks-to-add-to-page dropdown.
|
||||
jQuery('#block-options option[value="' + block + '"]').attr("disabled", "true"); |
||||
}); |
||||
|
||||
return false; |
||||
}); |
||||
|
||||
// Remove block
|
||||
$('.my-page--container') |
||||
.on('click', '.my-page--remove-block', function (evt) { |
||||
evt.preventDefault(); |
||||
|
||||
var link = $(this); |
||||
var block = link.data('name'); |
||||
var dasherized = link.data('dasherized'); |
||||
|
||||
jQuery |
||||
.ajax( |
||||
{ |
||||
url: link.attr('href'), |
||||
type: 'POST', |
||||
dataType: 'html', |
||||
data: { |
||||
block: block |
||||
} |
||||
}) |
||||
.fail(function(error) { |
||||
jQuery(window).trigger( |
||||
'op:notifications:add', |
||||
{ |
||||
type: 'error', |
||||
message: I18n.t('js.error.cannot_save_changes_with_message', { error: _.get(error, 'responseText', 'Internal error') }) |
||||
} |
||||
); |
||||
}) |
||||
.done(function() { |
||||
jQuery("#block-" + dasherized).remove(); |
||||
// Enable the option for this block in the blocks-to-add-to-page dropdown.
|
||||
jQuery('#block-options option[value="' + block + '"]').removeAttr("disabled"); |
||||
}); |
||||
|
||||
return false; |
||||
}); |
||||
|
||||
// Canonical list of containers that will exchange draggable elements.
|
||||
var containers = jQuery('.dragula-container').toArray(); |
||||
var drake = dragula(containers); |
||||
|
||||
// On 'el' drop, we fire an Ajax request to persist the order chosen by
|
||||
// the user. Actual ordering details are handled on the server.
|
||||
drake.on('drop', function(el, target, source, sibling){ |
||||
var url = window.gon.my_order_blocks_url; |
||||
|
||||
// Array of target ordered children after this drop.
|
||||
var target_ordered_children = jQuery(target).find('.block-wrapper').map(function(){ |
||||
return jQuery(this).data('name'); |
||||
}).get(); |
||||
|
||||
// Array of source ordered children after this drop.
|
||||
var source_ordered_children = jQuery(source).find('.block-wrapper').map(function(){ |
||||
return jQuery(this).data('name'); |
||||
}).get(); |
||||
|
||||
// We send the source, target, and the new order of the children in both
|
||||
// containers to the server.
|
||||
jQuery.ajax({ |
||||
url: url, |
||||
type: 'POST', |
||||
data: { |
||||
target: jQuery(target).attr('id'), |
||||
source: jQuery(source).attr('id'), |
||||
target_ordered_children: target_ordered_children, |
||||
source_ordered_children: source_ordered_children |
||||
} |
||||
}); |
||||
}); |
||||
}); |
@ -1,46 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<div id="block-<%= block_name.dasherize %>" class="widget-box block-wrapper" data-name='<%= block_name %>'> |
||||
|
||||
<% content_for "#{block_name}-remove-block" do %> |
||||
<div class="box-actions"> |
||||
<%= link_to '', |
||||
{ action: "remove_block", block: block_name }, |
||||
class: "icon icon-close close-icon my-page--remove-block", |
||||
data: { name: block_name, dasherized: block_name.dasherize }, |
||||
title: l(:button_remove_widget) |
||||
%> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div class='handle'> |
||||
<%= render partial: "my/blocks/#{block_name}", locals: { user: user, edit: true, block_name: block_name } %> |
||||
</div> |
||||
</div> |
@ -1,12 +0,0 @@ |
||||
<% unless blocks.nil? || blocks.empty? %> |
||||
<% blocks.each do |block_name| %> |
||||
<% next unless MyController.available_blocks.keys.include? block_name %> |
||||
<% if edit %> |
||||
<%= render partial: "my/block", locals: { block_name: block_name, user: @user } %> |
||||
<% else %> |
||||
<div class="widget-box"> |
||||
<%= render partial: "my/blocks/#{block_name}", locals: { edit: false, user: @user } %> |
||||
</div> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
@ -1,4 +0,0 @@ |
||||
<%= render partial: 'block', |
||||
locals: { user: @user, |
||||
block_name: @block |
||||
} %> |
@ -1,45 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-calendar') %> |
||||
<span class="widget-box--header-title"><%=l(:label_calendar)%></span> |
||||
</h3> |
||||
|
||||
<% if edit %> |
||||
<div class="macro -embedded-table ck-widget"> |
||||
<%= t('js.editor.macro.embedded_calendar.text') %> |
||||
</div> |
||||
<% else %> |
||||
<wp-embedded-calendar></wp-embedded-calendar> |
||||
<% end %> |
@ -1,7 +0,0 @@ |
||||
<% if edit %> |
||||
<div class="macro -embedded-table ck-widget"> |
||||
<%= t('js.editor.macro.embedded_table.text') %> |
||||
</div> |
||||
<% else %> |
||||
<%= render partial: 'work_packages/me_list_simple', locals: { user_filter: user_filter } %> |
||||
<% end %> |
@ -1,46 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-assigned-to-me') %> |
||||
<span class="widget-box--header-title"><%=l(:label_assigned_to_me_work_packages)%></span> |
||||
</h3> |
||||
|
||||
<%= render partial: 'my/blocks/embedded_work_package_table', |
||||
locals: { edit: edit, user_filter: :assignee } %> |
||||
|
||||
<% content_for :header_tags do %> |
||||
<%= auto_discovery_link_tag(:atom, |
||||
work_packages_assigned_to_me_path({format: 'atom', key: User.current.rss_key}), |
||||
{title: l(:label_assigned_to_me_work_packages)}) %> |
||||
<% end %> |
@ -1,46 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-reported-by-me') %> |
||||
<span class="widget-box--header-title"><%=l(:label_reported_work_packages)%></span> |
||||
</h3> |
||||
|
||||
<%= render partial: 'my/blocks/embedded_work_package_table', |
||||
locals: { edit: edit, user_filter: :author } %> |
||||
|
||||
<% content_for :header_tags do %> |
||||
<%= auto_discovery_link_tag(:atom, |
||||
work_packages_reported_by_me_path({format: 'atom', key: User.current.rss_key}), |
||||
{title: l(:label_reported_work_packages)}) %> |
||||
<% end %> |
@ -1,39 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-preview') %> |
||||
<span class="widget-box--header-title"><%=l(:label_watched_work_packages)%></span> |
||||
</h3> |
||||
|
||||
<%= render partial: 'my/blocks/embedded_work_package_table', |
||||
locals: { edit: edit, user_filter: :watcher } %> |
@ -1,63 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<% news = News.limit(10) |
||||
.order("#{News.table_name}.created_on DESC") |
||||
.where("#{News.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})") |
||||
.includes(:project, :author) unless @user.projects.empty? %> |
||||
|
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-news') %> |
||||
<span class="widget-box--header-title"><%= l(:label_news_latest) %></span> |
||||
</h3> |
||||
|
||||
<% news = News.latest(count: 3) %> |
||||
|
||||
<% if news.empty? %> |
||||
<%= no_results_box(custom_title: t('news.my_page.no_results_title_text')) %> |
||||
<% end %> |
||||
|
||||
<% unless news.empty? %> |
||||
<ul class="widget-box--arrow-links"> |
||||
<% news.each do |news| %> |
||||
<li class="-widget-box--arrow-multiline"> |
||||
<div> |
||||
<%= avatar(news.author, {class: 'avatar-mini'}) %> |
||||
<%= link_to_project(news.project) + ': ' %> |
||||
<%= link_to h(news.title), news_path(news) %> |
||||
<br/> |
||||
<p class="widget-box--additional-info"><%= authoring news.created_on, news.author %></p> |
||||
</div> |
||||
</li> |
||||
<% end %> |
||||
</ul> |
||||
<% end %> |
@ -1,142 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-time') %> |
||||
<span class="widget-box--header-title"><%=l(:label_spent_time)%> (<%= l(:label_last_n_days, 7) %>)</span> |
||||
</h3> |
||||
|
||||
<% |
||||
entries = TimeEntry.where(["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - 6, Date.today]) |
||||
.includes(:activity, :project, { work_package: [:type, :status] }) |
||||
.references(:projects) |
||||
.order("#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{::Type.table_name}.position ASC, #{WorkPackage.table_name}.id ASC") |
||||
entries_by_day = entries.group_by(&:spent_on) |
||||
%> |
||||
|
||||
<div class="total-hours"> |
||||
<p><%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(:hours).to_f) %></p> |
||||
</div> |
||||
|
||||
<% if entries.any? %> |
||||
<div class="generic-table--container"> |
||||
<div class="generic-table--results-container"> |
||||
<table class="generic-table time-entries"> |
||||
<colgroup> |
||||
<col highlight-col> |
||||
<col highlight-col> |
||||
<col highlight-col> |
||||
<col highlight-col> |
||||
<col> |
||||
</colgroup> |
||||
<thead> |
||||
<tr> |
||||
<th> |
||||
<div class="generic-table--sort-header-outer"> |
||||
<div class="generic-table--sort-header"> |
||||
<span> |
||||
<%= l(:label_activity) %> |
||||
</span> |
||||
</div> |
||||
</div> |
||||
</th> |
||||
<th> |
||||
<div class="generic-table--sort-header-outer"> |
||||
<div class="generic-table--sort-header"> |
||||
<span> |
||||
<%= Project.model_name.human %> |
||||
</span> |
||||
</div> |
||||
</div> |
||||
</th> |
||||
<th> |
||||
<div class="generic-table--sort-header-outer"> |
||||
<div class="generic-table--sort-header"> |
||||
<span> |
||||
<%= TimeEntry.human_attribute_name(:comments) %> |
||||
</span> |
||||
</div> |
||||
</div> |
||||
</th> |
||||
<th> |
||||
<div class="generic-table--sort-header-outer"> |
||||
<div class="generic-table--sort-header"> |
||||
<span> |
||||
<%= TimeEntry.human_attribute_name(:hours) %> |
||||
</span> |
||||
</div> |
||||
</div> |
||||
</th> |
||||
<th><div class="generic-table--empty-header"></div></th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<% entries_by_day.keys.sort.reverse.each do |day| %> |
||||
<tr> |
||||
<td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td> |
||||
<td></td> |
||||
<td></td> |
||||
<td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td> |
||||
<td></td> |
||||
</tr> |
||||
<% entries_by_day[day].each do |entry| -%> |
||||
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;"> |
||||
<td class="activity"><%=h entry.activity %></td> |
||||
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, truncate: 50) if entry.work_package%></td> |
||||
<td class="comments"><%=h entry.comments %></td> |
||||
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td> |
||||
<td class="buttons"> |
||||
<% if entry.editable_by?(@user) -%> |
||||
<%= link_to icon_wrapper('icon-context icon-edit', ''), |
||||
{controller: '/timelog', action: 'edit', id: entry}, |
||||
alt: l(:button_edit), |
||||
class: 'no-decoration-on-hover', |
||||
title: l(:button_edit) %> |
||||
<%= link_to icon_wrapper('icon-context icon-delete', ''), |
||||
{controller: '/timelog', action: 'destroy', id: entry}, |
||||
data: { confirm: l(:text_are_you_sure) }, |
||||
class: 'no-decoration-on-hover', |
||||
method: :delete, |
||||
alt: l(:button_delete), |
||||
title: l(:button_delete) %> |
||||
<% end -%> |
||||
</td> |
||||
</tr> |
||||
<% end -%> |
||||
<% end -%> |
||||
</tbody> |
||||
</table> |
||||
|
||||
</div> |
||||
</div> |
||||
<% end %> |
@ -1,45 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<% if defined? block_name %> |
||||
<%= content_for "#{block_name}-remove-block" %> |
||||
<% end %> |
||||
|
||||
<h3 class="widget-box--header"> |
||||
<%= op_icon('icon-context icon-assigned-to-me') %> |
||||
<span class="widget-box--header-title"><%=l(:label_responsible_for_work_packages)%></span> |
||||
</h3> |
||||
|
||||
<%= render partial: 'my/blocks/embedded_work_package_table', |
||||
locals: { edit: edit, user_filter: :responsible } %> |
||||
|
||||
<% content_for :header_tags do %> |
||||
<%= auto_discovery_link_tag(:atom, |
||||
work_packages_responsible_for_path({format: 'atom', key: User.current.rss_key}), |
||||
{title: l(:label_responsible_for_work_packages)}) %> |
||||
<% end %> |
@ -1,69 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<%= javascript_include_tag 'my_page' %> |
||||
<%= include_gon(nonce: content_security_policy_nonce(:script)) %> |
||||
|
||||
<%= toolbar title: l(:label_my_page) do %> |
||||
<%= styled_form_tag({ action: "add_block" }, class: 'my-page--block-form') do %> |
||||
<% options = "<option disabled selected>--#{t(:button_add)}--</option>" |
||||
.html_safe |
||||
.concat(options_for_select(@block_options)) %> |
||||
|
||||
<li class="toolbar-item"> |
||||
<%= styled_select_tag 'block', options, id: 'block-options',class: '-small' %> |
||||
</li> |
||||
|
||||
<li class="toolbar-item"> |
||||
<%= submit_tag l(:button_add), class: 'button' %> |
||||
</li> |
||||
|
||||
<li class="toolbar-item"> |
||||
<%= link_to({action: 'page'}, class: 'button') do %> |
||||
<%= op_icon('button--icon icon-cancel') %> |
||||
<span class="button--text"><%= l(:button_save_back) %></span> |
||||
<% end %> |
||||
</li> |
||||
<% end %> |
||||
<% end %> |
||||
|
||||
<h4><%=l(:label_visible_elements) %></h4> |
||||
<div id='visible-grid' class="my-page--container"> |
||||
<div id="top" class="dragula-container grid-content block-receiver"> |
||||
<%= render partial: 'block_container', locals: { edit: true, blocks: @blocks['top'] } %> |
||||
</div> |
||||
<div class="grid-block widget-boxes"> |
||||
<% %w(left right).each do |position| %> |
||||
<div id="<%= position %>" class="dragula-container grid-content block-receiver"> |
||||
<%= render partial: 'block_container', locals: { edit: true, blocks: @blocks[position] } %> |
||||
</div> |
||||
<% end %> |
||||
</div> |
||||
</div> |
||||
|
||||
<% html_title(l(:label_my_page)) -%> |
@ -1,46 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2018 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2017 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See docs/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% |
||||
query_properties = { |
||||
'columns[]': %w(id project type subject), |
||||
filters: |
||||
JSON.dump([{ user_filter => { operator: '=', values: ['me'] } }, { status: { operator: 'o', values: []}}]).to_s |
||||
} |
||||
|
||||
configuration = { |
||||
actionsColumnEnabled: false, |
||||
columnMenuEnabled: false, |
||||
contextMenuEnabled: false |
||||
} |
||||
%> |
||||
|
||||
<wp-embedded-table-entry query-props="<%= query_properties.to_json %>" |
||||
configuration="<%= configuration.to_json %>"> |
||||
</wp-embedded-table-entry> |
Loading…
Reference in new issue