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

remove duplicated code and unnecessary files

bsatarnejadd4054f287f97
diff --git a/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-details.controller.ts b/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-details.controller.ts
deleted file mode 100644
index 33c3408f387..00000000000
--- a/frontend/src/stimulus/controllers/dynamic/meetings-sidebar-details.controller.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * -- copyright
- * OpenProject is an open source project management software.
- * Copyright (C) 2023 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.
- * ++
- */
-
-import { Controller } from '@hotwired/stimulus';
-
-export default class MeetingsSidebarDetailsController extends Controller {
- static targets = ['showHideButton', 'hiddenParticipants'];
- declare readonly showHideButtonTarget:HTMLInputElement;
- declare readonly hiddenParticipantsTarget:HTMLElement;
-
- connect():void {
- this.showHiddenParticipants();
- }
-
- showHiddenParticipants():void {
- this.showHideButtonTarget.addEventListener('click', () => {
- if (this.hiddenParticipantsTarget.classList.contains('d-none')) {
- this.hiddenParticipantsTarget.classList.remove('d-none');
- } else {
- this.hiddenParticipantsTarget.classList.add('d-none');
- }
- });
- }
-}
diff --git a/modules/meeting/app/components/_index.sass b/modules/meeting/app/components/_index.sass
index c3880088011..2f17a54aef6 100644
--- a/modules/meeting/app/components/_index.sass
+++ b/modules/meeting/app/components/_index.sass
@@ -1,4 +1,3 @@
@import "./meeting_agenda_items/item_component/show_component.sass"
@import "./meeting_agenda_items/form_component.sass"
@import "./meetings/sidebar/state_component.sass"
-@import "./meetings/sidebar/details_component.sass"
diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.html.erb b/modules/meeting/app/components/meetings/sidebar/details_component.html.erb
index 74b62bd9736..a8a75b710db 100644
--- a/modules/meeting/app/components/meetings/sidebar/details_component.html.erb
+++ b/modules/meeting/app/components/meetings/sidebar/details_component.html.erb
@@ -1,5 +1,5 @@
<%=
- component_wrapper(data: wrapper_data_attributes) do
+ component_wrapper do
flex_layout do |details_container|
details_container.with_row do
flex_layout(align_items: :center, justify_content: :space_between) do |heading|
diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.rb b/modules/meeting/app/components/meetings/sidebar/details_component.rb
index 436af43a8ec..3954f729b1f 100644
--- a/modules/meeting/app/components/meetings/sidebar/details_component.rb
+++ b/modules/meeting/app/components/meetings/sidebar/details_component.rb
@@ -40,13 +40,6 @@ module Meetings
private
- def wrapper_data_attributes
- {
- controller: 'meetings-sidebar-details',
- 'application-target': 'dynamic'
- }
- end
-
def render_truncated_location
render(Primer::Beta::Truncate.new) do |component|
component.with_item(max_width: 250) do
@@ -54,30 +47,6 @@ module Meetings
end
end
end
-
- def render_participant(participant)
- flex_layout(align_items: :center) do |flex|
- flex.with_column(classes: 'ellipsis') do
- render(Users::AvatarComponent.new(user: participant.user,
- size: :medium,
- classes: 'op-principal_flex'))
- end
- render_participant_state(participant, flex)
- end
- end
-
- def render_participant_state(participant, flex)
- if participant.attended?
- flex.with_column(ml: 1) do
- render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) { t("description_attended").capitalize }
- end
- elsif participant.invited?
- flex.with_column(ml: 1) do
- render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) { t("description_invite").capitalize }
- end
- end
- end
-
def render_meeting_attribute_row(icon, &)
flex_layout(align_items: :center, justify_content: :space_between) do |flex|
flex.with_column do
diff --git a/modules/meeting/app/components/meetings/sidebar/details_component.sass b/modules/meeting/app/components/meetings/sidebar/details_component.sass
deleted file mode 100644
index c980f3d981f..00000000000
--- a/modules/meeting/app/components/meetings/sidebar/details_component.sass
+++ /dev/null
@@ -1,12 +0,0 @@
-@import 'helpers'
-.op-meeting-sidebar-details-participants
- display: none
- &-button
- padding: 0 !important
- color: var(--content-link-color)
-
-
-
-@media screen and (max-width: $breakpoint-sm)
- .op-meeting-sidebar-details-participants
- display: block !important
\ No newline at end of file