90 Commits

Author SHA1 Message Date
Klaus Zanders 20060a86b6 Allow to access news#show globally 2026-02-10 18:32:36 +01:00
Klaus Zanders 8a30e637c8 Fix rubocop issues after refactoring 2026-02-09 15:26:41 +01:00
Klaus Zanders 05df992b61 Properly load news through scopes 2026-02-09 15:07:54 +01:00
Alexander Brandon Coles ac84c7fc58 Update more actions to respond with 303 See Other 2025-09-26 09:15:24 +02:00
Alexander Brandon Coles f15be6e07f Freeze string literals in app/controllers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/controllers
2025-07-18 17:51:00 +01:00
Dombi Attila 10dc5538a2 [#63386] Use rescue_from ActiveRecord::RecordNotFound
https://community.openproject.org/work_packages/63386
2025-04-14 13:44:28 +03:00
Oliver Günther fa99c5bef6 Render with status: :unprocessable_entity 2024-10-11 08:42:58 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther 25f6994ce1 Add API endpoints for news 2024-06-25 14:38:00 +02:00
ulferts 563229dc3e rename method for clarity 2024-06-10 17:19:55 +02:00
ulferts d3e81b257b remove methods rendered superfluous by using default auth methods 2024-06-07 16:57:27 +02:00
ulferts ed5a162230 allow actions to be called on those not using default authorization before_actions 2024-06-07 16:55:40 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Aaron Contreras 744411d6ac Add the News menu item to the global menu
Moved its only feature spec to cuprite :)
2023-07-12 09:19:14 -05:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts 5968c0b18a Fix/replace custom i18n function (#8681)
* replace custom i18n function calls

* remove custom i18n method
2020-09-16 11:26:15 +02:00
ulferts 9e2287bfcc rename and inflect according to zeitwerk 2020-02-21 20:47:24 +01:00
ulferts a62c157f18 rename news created_on column to created_at 2020-02-17 13:12:57 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts d74dd04241 remove outdated api/atom references 2019-08-27 11:22:36 +02:00
Oliver Günther d32e9f6788 Use page_param, not params[:page]
[ci skip]
2019-01-09 08:48:29 +01:00
Inga Mai 2d0d2feccf [27828] Feature: Query menu in sidenav (#6429)
* in main menu add gantt as extra work package child item

* Satisfy spec and code climate

* Add gantt chart icon behin default gantt query name.

* WIP Query menu in left sidebar

* Shift query dropdown in left sidenav

* Reload menu or load query on click from every project location

* WIP set correct label for default queries

* Query menu listens on all changes of queries (delete, create, rename, toggle starred) and updates immediatly

* WIP: Inline edit, field validation

* Inline Edit validation and comfirm

* Inline edit: validation of duplicate name

* Set default columns and sorting for static queries

* Codeclimate issues fixed

* WIP Inline edit validation not working perfectly in all error states

* Inline edit working

* Autocompleter hover disabled and hovering over categories fixed

* Category hover and toggle fixed; tested in Chrome, Firefox and Opera

* Placeholder cut off fixed and text wrap added

* English and german wording adjusted

* Styles of inline edit and menu adjusted; matching wiki page styles

* prevent menus to be displayed to often

* application menu only displayed on work package

* specify using no_menu layout more often

* adapt tests to altered production implementation

* Hamburger icon only in project; on global wp page: default queries shown correctly and summary removed

* searching for undefined leads to error

* Accessible click fixed (listen on escape)

* Gantt in top menu deleted (gantt chart is part of default queries on wp page)

* load menu on wp summary page

* reduce times queries are loaded

* lowercase on second word

* remove menu from search and home

* Styles fixed (category toggle and correct highlighting)

* reflect static query in url

* fix autocomplete handling in specs

* Open all global menus on default and hide hamburger icon on global pages; Rebuild changes that have been ovrwritten after merge"

* Correct highlighting of default queries  after reload

* Replace summary cuke with spec

* WIP

* Clear up selectors

* Avoid actively setting promises and instead use $state.go to load links

[ci skip]

* Make editable title component a little simpler

We can reuse the component I built for the wiki, that wasn't present in
the frontend beforehand.

* Fix moving through the menu and selecting items

[ci skip]

* Add save button to query title when query changed

* Improve static names lookup by comparing query_props

* Adapt and fix specs

* Allow inner scrolling of wp query results

Also, style the webkit scrollbar to make it pretty where supported

* Allow renaming the query through setting menu, but simply focus on field

[ci skip]
2018-08-09 14:51:49 +02:00
Jens Ulferts 97ad5e0008 reenable previews 2018-07-17 12:14:52 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Oliver Günther fe0e8dd919 Rename before_filter to before_action 2016-09-06 15:40:49 +02:00
Jens Ulferts 3246747ae0 adapt to newly introduced query 2016-08-25 10:27:33 +02:00
Henriette Dinger e337822715 Refactor menu splitting and project drop down
This allows us to use the helper to decide when a drop-down node is
selected based on its content.

Since we do not always pass MenuItems to the render_drop_down_node
helper, we unfortunately must pass the selected state of its contents in that
case.

Also moves project and help helpers into separate modules
2016-06-13 20:03:40 +02:00
Henriette Dinger 595e25a346 Add missing flash messages 2016-02-09 20:57:20 +01:00
Jens Ulferts 03a3460ba2 use AR method to reverse
reverse! is not defined on an ActiveRecord AssociationProxy. This used to work when an array was still returned
2015-11-16 10:28:45 +01:00
Mohamed Wael Khobalatte d2349cf819 Delete Redmine's safe_attributes implementation
It was an early implementation of strong_parameters, more or less.
Going forward, we should strive to make the whitelisting of attributes
a controller responsibility only.
2015-10-23 14:33:55 +02:00
Mohamed Wael Khobalatte 972b04d86e Refactor to allow for strong params
We no longer need attr_accessible.
2015-10-23 14:33:55 +02:00
Alex Coles 0ad3cfb4b2 Prefer do…end for controller respond_to blocks
`rubocop -a` does not currently normalise formatting consistently
(see ec1bb39f).

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-07-07 19:44:22 +02:00
Alex Coles ec1bb39f9b Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:27 +02:00
Florian Kraft f78d1b6254 use toolbar component in news sections
Signed-off-by: Florian Kraft <f.kraft@finn.de>
2015-05-18 14:56:39 +02:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles bb0e6e6aa5 Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Alex Coles 336446c59d Use 1.9+ Hash syntax in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Hagen Schink 628a8a71a8 Authorize preview object access 2014-03-21 11:38:13 +01:00
Hagen Schink 1735cb1d19 Authorize through #find_optional_project 2014-03-21 09:31:46 +01:00
Hagen Schink 43cc5f677e Fix preview 2014-03-21 09:31:35 +01:00