Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use the new classes and structure for widget headers in the LSG and remove two unused files (#8279)

Henriette Darge35bfce6ccb09
diff --git a/app/assets/stylesheets/content/_widget_box.lsg b/app/assets/stylesheets/content/_widget_box.lsg
index eee72a30cd0..d936cc7f37c 100644
--- a/app/assets/stylesheets/content/_widget_box.lsg
+++ b/app/assets/stylesheets/content/_widget_box.lsg
@@ -9,8 +9,9 @@
<!-- Widget box with arrows: Single-line -->
<div class="widget-box">
<h3 class="widget-box--header">
- <span class="icon-context icon-home"></span>
- <span class="widget-box--header-title">Widget Box</span>
+ <div class="widget-box--header-title title-container">
+ <h2 class="editable-toolbar-title--fixed">Widget Box</h2>
+ </div>
</h3>
<p class="widget-box--additional-info">This widget box can be used to display content belonging to one subject.</p>
<ul class="widget-box--arrow-links">
@@ -26,8 +27,9 @@
<!-- Widget box with arrows: Multiline -->
<div class="widget-box">
<h3 class="widget-box--header">
- <i class="icon-context icon-home"></i>
- <span class="widget-box--header-title">Widget Box 2</span>
+ <div class="widget-box--header-title title-container">
+ <h2 class="editable-toolbar-title--fixed">Widget Box 2</h2>
+ </div>
</h3>
<ul class="widget-box--arrow-links">
<li class="-widget-box--arrow-multiline">
@@ -60,8 +62,9 @@
<!-- Widget box with button -->
<div class="widget-box">
<h3 class="widget-box--header">
- <span class="icon-context icon-home"></span>
- <span class="widget-box--header-title">Widget Box 3</span>
+ <div class="widget-box--header-title title-container">
+ <h2 class="editable-toolbar-title--fixed">Widget Box 3</h2>
+ </div>
</h3>
<div class="overview">
<p>
@@ -80,8 +83,9 @@
<!-- Widget box with enumeration and multiple buttons -->
<div class="widget-box">
<h3 class="widget-box--header">
- <span class="icon-context icon-home"></span>
- <span class="widget-box--header-title">Widget Box 4</span>
+ <div class="widget-box--header-title title-container">
+ <h2 class="editable-toolbar-title--fixed">Widget Box 4</h2>
+ </div>
</h3>
<ul class="widget-box--enumeration">
<li>Enum1</li>
diff --git a/modules/documents/app/views/my/blocks/_documents.html.erb b/modules/documents/app/views/my/blocks/_documents.html.erb
deleted file mode 100644
index 9ee63e91564..00000000000
--- a/modules/documents/app/views/my/blocks/_documents.html.erb
+++ /dev/null
@@ -1,45 +0,0 @@
-<%#-- copyright
-OpenProject is an open source project management software.
-Copyright (C) 2012-2020 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-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-notes') %>
- <span class="widget-box--header-title"><%=l(:label_document_plural)%></span>
-</h3>
-
-<% project_ids = @user.projects.select {|p| @user.allowed_to?(:view_documents, p)}.collect(&:id) %>
-<%= render(partial: 'documents/document',
- collection: Document
- .limit(10)
- .order("#{Document.table_name}.created_at DESC")
- .where("#{Document.table_name}.project_id in (#{project_ids.join(',')})")
- .includes(:project)) unless project_ids.empty? %>
diff --git a/modules/documents/app/views/my_projects_overviews/blocks/_documents.html.erb b/modules/documents/app/views/my_projects_overviews/blocks/_documents.html.erb
deleted file mode 100644
index 833bde7b950..00000000000
--- a/modules/documents/app/views/my_projects_overviews/blocks/_documents.html.erb
+++ /dev/null
@@ -1,43 +0,0 @@
-<%#-- copyright
-OpenProject is an open source project management software.
-Copyright (C) 2012-2020 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-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_id %>
- <%= content_for block_name_id %>
-<% end %>
-
-<h3 class="widget-box--header">
- <%= op_icon('icon-context icon-notes') %>
- <span class="widget-box--header-title"><%=l(:label_document_plural)%></span>
-</h3>
-
-
-<% if current_user.allowed_to?(:view_documents, @project)%>
- <%= render(:partial => 'documents/document',
- :collection => Document.where(project_id: @project.id).limit(10).order("created_at DESC")) %>
-<% end %>