parent
c6723187f0
commit
c4ba5fb682
@ -0,0 +1,4 @@ |
||||
module ::Calendar |
||||
class BaseController < ::ApplicationController |
||||
end |
||||
end |
@ -0,0 +1,9 @@ |
||||
<%= |
||||
angular_component_tag 'op-view-select', |
||||
inputs: { |
||||
projectId: (@project ? @project.id.to_s : ''), |
||||
menuItems: [parent_name, name], |
||||
baseRoute: 'work-packages.calendar', |
||||
viewType: 'WorkPackagesCalendar', |
||||
} |
||||
%> |
@ -0,0 +1,4 @@ |
||||
# English strings go here |
||||
en: |
||||
permission_view_calendar: "View calendar" |
||||
project_module_calendar_view: "Calendar" |
@ -0,0 +1,7 @@ |
||||
OpenProject::Application.routes.draw do |
||||
scope 'projects/:project_id', as: 'project' do |
||||
resources :calendar, controller: 'calendar/calendar', only: [:index] |
||||
end |
||||
|
||||
resources :calendar, controller: 'calendar/calendar', only: [:index] |
||||
end |
@ -0,0 +1,33 @@ |
||||
#-- copyright |
||||
# OpenProject is an open source project management software. |
||||
# Copyright (C) 2012-2021 the OpenProject GmbH |
||||
# |
||||
# 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-2013 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 COPYRIGHT and LICENSE files for more details. |
||||
#++ |
||||
|
||||
module OpenProject |
||||
module Calendar |
||||
require 'open_project/calendar/engine' |
||||
end |
||||
end |
@ -0,0 +1,54 @@ |
||||
# OpenProject Calendar module |
||||
# |
||||
# Copyright (C) 2021 OpenProject GmbH |
||||
# |
||||
# 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. |
||||
|
||||
module OpenProject::Calendar |
||||
class Engine < ::Rails::Engine |
||||
engine_name :openproject_calendar |
||||
|
||||
include OpenProject::Plugins::ActsAsOpEngine |
||||
|
||||
register 'openproject-calendar', |
||||
author_url: 'https://www.openproject.org', |
||||
bundled: true, |
||||
settings: {}, |
||||
name: 'OpenProject Calendar' do |
||||
project_module :calendar_view, dependencies: :work_package_tracking do |
||||
permission :view_calendar, |
||||
{ 'calendar/calendar': %i[index] } |
||||
end |
||||
|
||||
menu :project_menu, |
||||
:calendar_view, |
||||
{ controller: '/calendar/calendar', action: 'index' }, |
||||
caption: :label_calendar, |
||||
icon: 'icon2 icon-calendar', |
||||
after: :work_packages |
||||
|
||||
menu :project_menu, |
||||
:calendar_menu, |
||||
{ controller: '/calendar/calendar', action: 'index' }, |
||||
parent: :calendar_view, |
||||
partial: 'calendar/calendar/menu', |
||||
last: true, |
||||
caption: :label_calendar |
||||
end |
||||
|
||||
add_view :WorkPackagesCalendar, |
||||
contract_strategy: 'Calendar::Views::ContractStrategy' |
||||
end |
||||
end |
@ -0,0 +1 @@ |
||||
require 'open_project/calendar' |
@ -0,0 +1,13 @@ |
||||
# encoding: UTF-8 |
||||
|
||||
Gem::Specification.new do |s| |
||||
s.name = 'openproject-calendar' |
||||
s.version = '1.0.0' |
||||
s.authors = 'OpenProject GmbH' |
||||
s.email = 'info@openproject.com' |
||||
s.summary = 'OpenProject Calendar' |
||||
s.description = 'Provides calendar views' |
||||
s.license = 'GPLv3' |
||||
|
||||
s.files = Dir['{app,config,db,lib}/**/*'] |
||||
end |
Loading…
Reference in new issue