You've already forked baupm-core
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2766c70cd | |||
| 286c29ce44 | |||
| 4cd0396c95 | |||
| 1c4ebe2d22 | |||
| 6452e561ef | |||
| a191db0455 | |||
| d12feef4ba | |||
| db721ea1d8 | |||
| e88c2fca68 | |||
| 87484916ad | |||
| 8b5ad1d28c | |||
| 7c2335b701 |
@@ -5,8 +5,8 @@ Common modifications to run Redmine as project management tool on medium- and la
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
cd {redmine_dir}/plugins
|
||||
git clone https://hub.bundespruefstelle.ch/magdev/baupm-core.git baupm_core
|
||||
cd {redmine_dir}
|
||||
git clone https://hub.bundespruefstelle.ch/magdev/baupm-core.git plugins/baupm_core
|
||||
```
|
||||
|
||||
Now restart redmine and you're done.
|
||||
|
||||
9
app/controllers/healthcheck_controller.rb
Normal file
9
app/controllers/healthcheck_controller.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class ManifestController < ApplicationController
|
||||
unloadable
|
||||
|
||||
skip_before_action :check_if_login_required
|
||||
|
||||
def index
|
||||
render :layout => false, :action => 'index'
|
||||
end
|
||||
end
|
||||
1
app/views/healthcheck/index.html.erb
Normal file
1
app/views/healthcheck/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
OK
|
||||
51
app/views/news/index.html.erb
Normal file
51
app/views/news/index.html.erb
Normal file
@@ -0,0 +1,51 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:label_news_new),
|
||||
(@project ? project_news_index_path(@project) : news_index_path),
|
||||
:class => 'icon icon-add add-news-link',
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if User.current.allowed_to?(:manage_news, @project, global: true) %>
|
||||
<%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
|
||||
</div>
|
||||
|
||||
<div id="add-news" style="display:none;">
|
||||
<h2><%=l(:label_news_new)%></h2>
|
||||
<%= labelled_form_for @news, :url => (@project ? project_news_index_path(@project) : news_index_path),
|
||||
:html => { :id => 'news-form', :multipart => true } do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_news_plural)%></h2>
|
||||
|
||||
<% if @newss.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<section class="news-list flex">
|
||||
<% @newss.each do |news| %>
|
||||
<article class="news-article">
|
||||
<header>
|
||||
<h3><%= avatar(news.author) %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
|
||||
<%= link_to h(news.title), news_path(news) %>
|
||||
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
|
||||
<p class="author"><%= authoring news.created_on, news.author %></p>
|
||||
</header>
|
||||
<div class="wiki">
|
||||
<%= textilizable(news, :description) %>
|
||||
</div>
|
||||
</article>
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
<span class="pagination"><%= pagination_links_full @news_pages %></span>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.atom_key} %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, _project_news_path(@project, :key => User.current.atom_key, :format => 'atom')) %>
|
||||
<%= stylesheet_link_tag 'scm' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_news_plural)) -%>
|
||||
78
app/views/news/show.html.erb
Normal file
78
app/views/news/show.html.erb
Normal file
@@ -0,0 +1,78 @@
|
||||
<%= breadcrumb link_to(l(:label_news_plural), project_news_index_path(@project)) %>
|
||||
<div class="contextual">
|
||||
<%= watcher_link(@news, User.current) %>
|
||||
<%= link_to(l(:button_edit),
|
||||
edit_news_path(@news),
|
||||
:class => 'icon icon-edit',
|
||||
:accesskey => accesskey(:edit),
|
||||
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||||
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
|
||||
</div>
|
||||
|
||||
|
||||
<% if authorize_for('news', 'edit') %>
|
||||
<div id="edit-news" style="display:none;">
|
||||
<%= labelled_form_for :news, @news, :url => news_path(@news),
|
||||
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="news-page flex">
|
||||
<div class="news-content flex-box">
|
||||
<h2><%= avatar(@news.author) %> <%=h @news.title %></h2>
|
||||
<p>
|
||||
<% unless @news.summary.blank? %><em><%= @news.summary %></em><br /><% end %>
|
||||
<span class="author"><%= authoring @news.created_on, @news.author %></span>
|
||||
</p>
|
||||
<div class="wiki">
|
||||
<%= textilizable(@news, :description) %>
|
||||
</div>
|
||||
<%= link_to_attachments @news %>
|
||||
</div>
|
||||
|
||||
<div class="news-content flex-box">
|
||||
<div id="comments" style="margin-bottom:16px;">
|
||||
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
||||
<% if @news.commentable? && @comments.size >= 3 %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments", :scroll => "comment_comments" %></p>
|
||||
<% end %>
|
||||
<% @comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del' %>
|
||||
</div>
|
||||
<h4><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
|
||||
<div class="wiki">
|
||||
<%= textilizable(comment.comments) %>
|
||||
</div>
|
||||
<% end if @comments.any? %>
|
||||
</div>
|
||||
|
||||
<% if @news.commentable? %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
|
||||
:data => {
|
||||
:auto_complete => true
|
||||
}
|
||||
%>
|
||||
<%= wikitoolbar_for 'comment_comments', preview_news_path(:project_id => @project, :id => @news) %>
|
||||
</div>
|
||||
<p><%= submit_tag l(:button_add) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% html_title @news.title -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag 'scm' %>
|
||||
<% end %>
|
||||
88
app/views/queries/_query_form.html.erb
Normal file
88
app/views/queries/_query_form.html.erb
Normal file
@@ -0,0 +1,88 @@
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<%= hidden_field_tag 'type', @query.type, :disabled => true, :id => 'query_type' %>
|
||||
<%= query_hidden_sort_tag(@query) %>
|
||||
|
||||
<div id="query_form_with_buttons" class="hide-when-print">
|
||||
<div id="query_form_content">
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expanded" : "collapsed" %>"><%= l(:label_filter_plural) %></legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<% if @query.available_columns.any? %>
|
||||
<fieldset id="options" class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_options) %></legend>
|
||||
<div class="hidden">
|
||||
<% if @query.available_display_types.size > 1 %>
|
||||
<div>
|
||||
<span class="field"><label for='display_type'><%= l(:label_display_type) %></label></span>
|
||||
<%= available_display_types_tags(@query) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<table id="list-definition" class="<%= 'hidden' if (@query.display_type != 'list') %>">
|
||||
<% if @query.available_columns.any? %>
|
||||
<tr>
|
||||
<td class="field"><%= l(:field_column_names) %></td>
|
||||
<td><%= render_query_columns_selection(@query) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if @query.groupable_columns.any? %>
|
||||
<tr>
|
||||
<td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td>
|
||||
<td><%= group_by_column_select_tag(@query) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if @query.available_block_columns.any? %>
|
||||
<tr>
|
||||
<td class="field"><%= l(:button_show) %></td>
|
||||
<td><%= available_block_columns_tags(@query) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if @query.available_totalable_columns.any? %>
|
||||
<tr>
|
||||
<td><%= l(:label_total_plural) %></td>
|
||||
<td><%= available_totalable_columns_tags(@query) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? %>
|
||||
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function l(:button_save_object, object_name: l(:label_query)),
|
||||
"$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
|
||||
:class => 'icon icon-save' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if @query.editable_by?(User.current) %>
|
||||
<% redirect_params = (controller_name == 'admin' && action_name == 'projects') ? {:admin_projects => 1} : {} %>
|
||||
<%= link_to l(:button_edit_object, object_name: l(:label_query)), edit_query_path(@query, redirect_params), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query, redirect_params), {}, l(:button_delete_object, object_name: l(:label_query)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= error_messages_for @query %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(function ($) {
|
||||
$('input[name=display_type]').change(function (e) {
|
||||
if ($("#display_type_list").is(':checked')) {
|
||||
$('table#list-definition').show();
|
||||
} else {
|
||||
$('table#list-definition').hide();
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
<% end %>
|
||||
@@ -184,3 +184,34 @@ de:
|
||||
label_queries_for_current_project: Für das aktuelle Projekt
|
||||
text_allowed_queries: Nur öffentliche Abfragen auswählbar
|
||||
field_default_version: Standard-Meilenstein
|
||||
|
||||
# Plugin custom field groups
|
||||
label_custom_fields_group: CF-Gruppe
|
||||
label_custom_fields_group_new: Neue CF-Gruppe
|
||||
label_custom_fields_group_plural: CF-Gruppen
|
||||
label_custom_fields_group_settings: CF Gruppeneinstellungen
|
||||
label_custom_fields_group_tag: CF-Gruppen Tag
|
||||
label_group_tag_h3: H3
|
||||
label_group_tag_h4: H4
|
||||
label_group_tag_fieldset: Fieldset
|
||||
label_fieldset_default_state: Fieldset Default Status
|
||||
label_fieldset_state_all_expended: Alle ausklappen
|
||||
label_fieldset_state_all_collapsed: Alle einklappen
|
||||
|
||||
# Plugin EasyGantt
|
||||
button_project_menu_easy_gantt: Gantt-Plan
|
||||
easy_gantt_toolbar:
|
||||
day: Tage
|
||||
month: Monate
|
||||
week: Wochen
|
||||
quarter: Quartal
|
||||
year: Jahre
|
||||
easy_gantt:
|
||||
buton_create_baseline: Basispläne
|
||||
button_critical_path: Kritischer Weg
|
||||
button:
|
||||
quarter_zoom: Quartale
|
||||
year_zoom: Jahre
|
||||
easy_printable_templates_categories:
|
||||
easy_gantt: Gantt-Plan
|
||||
label_easy_gantt: Gantt-Plan
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
if Redmine::Plugin.installed? :baupm_core
|
||||
RedmineApp::Application.routes.draw do
|
||||
get '/manifest.json', :controller => 'manifest', :action => 'index', :as => 'manifest_json'
|
||||
get '/_healthcheck', :controller => 'healthcheck', :action => 'index', :as => 'healthcheck'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user