You've already forked baupm-core
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd {redmine_dir}/plugins
|
cd {redmine_dir}
|
||||||
git clone https://hub.bundespruefstelle.ch/magdev/baupm-core.git baupm_core
|
git clone https://hub.bundespruefstelle.ch/magdev/baupm-core.git plugins/baupm_core
|
||||||
```
|
```
|
||||||
|
|
||||||
Now restart redmine and you're done.
|
Now restart redmine and you're done.
|
||||||
|
|||||||
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 %>
|
||||||
@@ -184,3 +184,16 @@ de:
|
|||||||
label_queries_for_current_project: Für das aktuelle Projekt
|
label_queries_for_current_project: Für das aktuelle Projekt
|
||||||
text_allowed_queries: Nur öffentliche Abfragen auswählbar
|
text_allowed_queries: Nur öffentliche Abfragen auswählbar
|
||||||
field_default_version: Standard-Meilenstein
|
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
|
||||||
|
|||||||
2
init.rb
2
init.rb
@@ -10,7 +10,7 @@ Redmine::Plugin.register :baupm_core do
|
|||||||
author 'Marco Grätsch'
|
author 'Marco Grätsch'
|
||||||
author_url 'https://src.bundespruefstelle.ch/magdev'
|
author_url 'https://src.bundespruefstelle.ch/magdev'
|
||||||
description "Common modifications for BauPM"
|
description "Common modifications for BauPM"
|
||||||
version '0.2.0'
|
version '0.2.1'
|
||||||
|
|
||||||
requires_redmine :version_or_higher => '4.1.0'
|
requires_redmine :version_or_higher => '4.1.0'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user