* Add footer component for widget box
* Add footer component to the widget box as a slot
* Change projects widget to show the favorite projects
* Fix failing test
* Change the subitems widget
* Change the costs and budgets widgets
* Change the meeting widget
* Change the WPs widget in version
* Change memebers widget in project overview
* Change the favorite projects widget in my page
# Conflicts:
# frontend/src/app/shared/components/grids/widgets/project-favorites/widget-project-favorites.component.ts
* Add the widget box to the lookbook
* Add footer for members widget in dashboard
* Fix members widget capability check
* Add feature spec for favorites projects in my page
* Remove committed demo project gitlink
* Remove temporary body variables from the costs and budgets widget templates
* Remove the scroll for favorites widget
* Remove scrollbar for members and favorite projects widgets
* Change projects block to favorite projects
* Refine feature specs
* Fix the widget footer styles globally
* Rename the component name from project favorites to favorite projects
* Rename the test selector for project name
* Move widget content inside the body
* grid widgets stretch their content area so widget footers stay pinned to the bottom
* Ensure frontend-rendered grid widgets keep their turbo-loaded content in the widget flex layout so server-rendered footers stay pinned to the bottom
Turbo should do nothing if it encounters a completely empty response.
As such this commit completely removes the layout from Widget Controller
responses, explicitly setting HTTP response status to 204 No Content for
good measure. This should prevent Turbo from "breaking out" of the Turbo
Frame (redirecting to a blank page) when a widget is not rendered.
* when there is no members, show a button to add members
* remove turbo attribute
* add a blankslate when there is no member
* show a blankslate when the user doesnt have permission to see the memebers data
* show a blankslate when there is no news to show
* show a blankslate when there is no subitems in subitems widget
* set the correct button label for news in the widget
* add a test for subitems widget
* add a test for news widget
* add a test for members widget
* change test selector in news widget
* change test selector in subitems widget
* change test selector in members widget
* show add news button only when there is a project
* fix translations strings and remove them from js.en.yml
* change ui structure in members widget
* change ui structure in subitems widget
* mock permissions for the user in members widget
* Use test selector instead of css selector
* when the user has only view news permission it shouldn't show add button
* Add a test case for subitems when there are subprojects but user doesnt have permission to see them
* check view permission in any of the subprojects
https://community.openproject.org/wp/68850
The widget news controller was checking `:view_news` permission before
rendering. For projects without the news module enabled, the permission
check fails and renders a 403 error.
As the news widget from dashboard tab is rendered through Angular with
`WidgetNewsComponent` using a turbo-frame, the 403 error was somehow
rendering a full page error, preventing the page to be displayed
properly. This prevented people from accessing the project page.
This fixes the issue by disabling the permission check for the news
widget, and displaying a "Nothing new to report." message instead when
the module is disabled.
Drops superfluous `Component` suffix: the `Widgets` namespace should
make the type and purpose sufficiently clear. This also makes naming
consistent with homescreen blocks.
Moves components (including templates, styles, I18n strings), associated
controllers and routing under the grids module.
This change reflects the fact that widgets may be (re)used
across various different grids, e.g. Overviews/Dashboard, My Page and
Homescreen.
* Rework WidgetComponent to render its own WidgetBox
Adds `rows` slots to `WidgetBoxComponent` with the goal of offering a
similar API to `BorderBox` (albeit subset) and obviating the need for
brittle styling overrides.
Also moves responsibility for rendering `turbo-frame` to the Widget Box.
* Remove suffix from nested Header, Body classes
The `Component` suffix is useful in avoiding collisions with other
objects, especially Rails models, but one `Component` in a
full-qualified class name suffices.
* Fix failing test and pass header id from the widget box component
* Create a new component for showing Rows in the body
* Add component_wrapper to be able to act as streamable
---------
Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
Co-authored-by: Henriette Darge <h.darge@openproject.com>
Since this widget will be shared between grids implementations, moves
widget, routes, controllers and views to Grids module.
Also fixes widget permission.
* wp deletion modal changes
* fix test fails
* invite user modal changes
* fix eslint issus and add cancel button to summary modal
* add widget modal changes
* new board modal changes
* form configuration modal changes and remove unnecessary class
* WP table export modal changes
* WP save query modal changes
* visibility setting modal changes
* help text modal changes
* help video modal changes
* 2FA password confimation modal changes
* Delete EE token modal changes
* fix eslint errors
* eslint does not check the unbound method
* minor changes to switch the buttons and icon
* fix specs failing for invite user modal changes
* use the correct translations and revert the previous merge
* Fix opAutofocus directive
The opAutofocus directive was not setting focus if used like a normal
`autofocus` HTML attribute:
```
<input opAutofocus />
```
The above example would not produce a focus, because counterintuitively
Angular treats the default input to the directive here as an empty
string instead of undefined. This causes the default value of `true` NOT
to be set. Instead, the empty string was treated like the falsy value
it is.
* add focus on invite user modal while opening
* fix eslint errors
* eslint errors fix
* add icon delete for deleting ee token
* wp delete modal changes: remove unnecessary loading and change op-icon to a span
* remove unused components
* use spot-list for add-widget modal
* wp table configuration modal changes
* fix finding list item in add widget modal specs
* Chore/modal spacing (#11314)
* [chore] reworked spot-container spacings
* [chore] applied spot-container to spot-modal--body
- added style override for spacing within modal body
* [chore] removed unused modal footer class
* Remove scrollbar from project-include
Project include was creating scrollbars for the project list even if
it was not needed. This was caused by tooltips that were hidden in the
background but still affecting layouting.
This commit hides the tooltips correctly, and aligns the HTML structure
of project include to match that of file link list. A minimum height is
added to the project include list to make sure tooltips are readable even
if there is only one item in the list.
* [chore] rework of datepicker modal
- changed spacings, removed inner margins
- changed anchors to buttons (spot-link)
- added flatpickr override
- removed min-height
- moved project include min-height to root element
* [chore] fixed test selector
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
* redesign the save query modal changes
* remove op-form class from invite user modal since we have spot-container now
* add text and title for ee modal deletion
* showing the error message when it is not valid value in invite user modal
* close the inroduction video modal with button
* close the dynamic content modal without jquery
* fx eslint warnnings
* webhook response modal
* remove multiple cancel translation in invite user modal
* fix indentation in html file
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
Co-authored-by: Eric Schubert <38206611+Kharonus@users.noreply.github.com>
* [#43684] migrated op-modal to spot-modal
- https://community.openproject.org/work_packages/43684
- amended styles
- removed "modal--title"
- removed header component
- removed closing icon
- fixed backdrop click
- removed jquery from modal service
* [#43684] removed unused styling
- fixed some inconsitencies
- readded removed icon
- removed listener on close button
* [#43684] combined spot-action-bar
- used spot-action-bar in combination with spot-modal--footer
- fixed some styling in action bar
* [#43684] replaced more op-modal
- moved spec selectors to spot-modal
- replaced found op-modal in html templates
* [#43684] add no margin to old buttons in new dialogs
- added mobile modal behavior
- fixed some feature spec selectors
* [#43684] added modal close on mobile resolutions
* [#43684] fixed PR issues
- removed old css classes from html
- fixed feature spec click
- readded tour trigger on modal cancel
* when clicking outside the modal it will be closed instaed of clicking on a close button
* exclude _center class from spot-modal sass file itself and add it to the component style sheet
* Words should be break in any case like when there is no space there
* remove unnecessary classes that never used like _fullscreen and _cente, remove _limited-height class to make all the modal look the same
Co-authored-by: bsatarnejad <b.satarnejad@gmail.com>
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>