Pārlūkot izejas kodu

Merge branch 'redmine:master' into master

pull/131/head
7E674E5D9189 pirms 2 gadiem
vecāks
revīzija
864e80652d
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
100 mainītis faili ar 274 papildinājumiem un 221 dzēšanām
  1. 13
    2
      .rubocop.yml
  2. 79
    35
      .rubocop_todo.yml
  3. 16
    18
      Gemfile
  4. 3
    58
      app/controllers/account_controller.rb
  5. 1
    1
      app/controllers/activities_controller.rb
  6. 1
    1
      app/controllers/admin_controller.rb
  7. 1
    1
      app/controllers/application_controller.rb
  8. 2
    2
      app/controllers/attachments_controller.rb
  9. 1
    1
      app/controllers/auth_sources_controller.rb
  10. 1
    1
      app/controllers/auto_completes_controller.rb
  11. 1
    1
      app/controllers/boards_controller.rb
  12. 1
    1
      app/controllers/calendars_controller.rb
  13. 1
    1
      app/controllers/comments_controller.rb
  14. 1
    1
      app/controllers/context_menus_controller.rb
  15. 1
    1
      app/controllers/custom_field_enumerations_controller.rb
  16. 1
    1
      app/controllers/custom_fields_controller.rb
  17. 1
    1
      app/controllers/documents_controller.rb
  18. 1
    1
      app/controllers/email_addresses_controller.rb
  19. 1
    1
      app/controllers/enumerations_controller.rb
  20. 1
    1
      app/controllers/files_controller.rb
  21. 2
    2
      app/controllers/gantts_controller.rb
  22. 1
    1
      app/controllers/groups_controller.rb
  23. 1
    1
      app/controllers/imports_controller.rb
  24. 1
    1
      app/controllers/issue_categories_controller.rb
  25. 1
    1
      app/controllers/issue_relations_controller.rb
  26. 1
    1
      app/controllers/issue_statuses_controller.rb
  27. 3
    1
      app/controllers/issues_controller.rb
  28. 2
    1
      app/controllers/journals_controller.rb
  29. 1
    1
      app/controllers/mail_handler_controller.rb
  30. 1
    1
      app/controllers/members_controller.rb
  31. 1
    1
      app/controllers/messages_controller.rb
  32. 1
    1
      app/controllers/my_controller.rb
  33. 1
    1
      app/controllers/news_controller.rb
  34. 1
    1
      app/controllers/previews_controller.rb
  35. 1
    1
      app/controllers/principal_memberships_controller.rb
  36. 1
    1
      app/controllers/project_enumerations_controller.rb
  37. 17
    1
      app/controllers/projects_controller.rb
  38. 1
    1
      app/controllers/queries_controller.rb
  39. 7
    7
      app/controllers/reports_controller.rb
  40. 1
    1
      app/controllers/repositories_controller.rb
  41. 1
    1
      app/controllers/roles_controller.rb
  42. 1
    1
      app/controllers/search_controller.rb
  43. 1
    1
      app/controllers/settings_controller.rb
  44. 1
    1
      app/controllers/sys_controller.rb
  45. 1
    1
      app/controllers/timelog_controller.rb
  46. 1
    1
      app/controllers/trackers_controller.rb
  47. 1
    1
      app/controllers/twofa_backup_codes_controller.rb
  48. 1
    1
      app/controllers/twofa_controller.rb
  49. 1
    1
      app/controllers/users_controller.rb
  50. 1
    1
      app/controllers/versions_controller.rb
  51. 1
    1
      app/controllers/watchers_controller.rb
  52. 1
    1
      app/controllers/welcome_controller.rb
  53. 1
    1
      app/controllers/wiki_controller.rb
  54. 1
    1
      app/controllers/wikis_controller.rb
  55. 1
    1
      app/controllers/workflows_controller.rb
  56. 1
    1
      app/helpers/account_helper.rb
  57. 1
    1
      app/helpers/activities_helper.rb
  58. 1
    1
      app/helpers/admin_helper.rb
  59. 9
    4
      app/helpers/application_helper.rb
  60. 1
    1
      app/helpers/attachments_helper.rb
  61. 1
    1
      app/helpers/auth_sources_helper.rb
  62. 1
    1
      app/helpers/avatars_helper.rb
  63. 1
    1
      app/helpers/boards_helper.rb
  64. 1
    1
      app/helpers/calendars_helper.rb
  65. 1
    1
      app/helpers/context_menus_helper.rb
  66. 1
    1
      app/helpers/custom_fields_helper.rb
  67. 1
    1
      app/helpers/documents_helper.rb
  68. 1
    1
      app/helpers/email_addresses_helper.rb
  69. 1
    1
      app/helpers/enumerations_helper.rb
  70. 1
    1
      app/helpers/gantt_helper.rb
  71. 1
    1
      app/helpers/groups_helper.rb
  72. 1
    1
      app/helpers/imports_helper.rb
  73. 1
    1
      app/helpers/issue_categories_helper.rb
  74. 1
    1
      app/helpers/issue_relations_helper.rb
  75. 1
    1
      app/helpers/issue_statuses_helper.rb
  76. 7
    1
      app/helpers/issues_helper.rb
  77. 11
    2
      app/helpers/journals_helper.rb
  78. 1
    1
      app/helpers/mail_handler_helper.rb
  79. 1
    1
      app/helpers/members_helper.rb
  80. 1
    1
      app/helpers/messages_helper.rb
  81. 1
    1
      app/helpers/my_helper.rb
  82. 1
    1
      app/helpers/news_helper.rb
  83. 1
    1
      app/helpers/principal_memberships_helper.rb
  84. 1
    1
      app/helpers/projects_helper.rb
  85. 1
    1
      app/helpers/projects_queries_helper.rb
  86. 1
    1
      app/helpers/queries_helper.rb
  87. 2
    2
      app/helpers/reports_helper.rb
  88. 1
    1
      app/helpers/repositories_helper.rb
  89. 1
    1
      app/helpers/roles_helper.rb
  90. 1
    1
      app/helpers/routes_helper.rb
  91. 1
    1
      app/helpers/search_helper.rb
  92. 5
    1
      app/helpers/settings_helper.rb
  93. 1
    1
      app/helpers/timelog_helper.rb
  94. 1
    1
      app/helpers/trackers_helper.rb
  95. 1
    1
      app/helpers/twofa_helper.rb
  96. 13
    1
      app/helpers/users_helper.rb
  97. 1
    1
      app/helpers/versions_helper.rb
  98. 1
    1
      app/helpers/watchers_helper.rb
  99. 1
    1
      app/helpers/welcome_helper.rb
  100. 0
    0
      app/helpers/wiki_helper.rb

+ 13
- 2
.rubocop.yml Parādīt failu

@@ -118,9 +118,15 @@ Rails/BulkChangeTable:
- 'db/migrate/20120714122200_add_workflows_rule_fields.rb'
- 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb'

Rails/CompactBlank:
Enabled: false

Rails/EnvironmentVariableAccess:
Enabled: false

Rails/FilePath:
Enabled: false

Rails/HelperInstanceVariable:
Enabled: false

@@ -133,13 +139,15 @@ Style/AsciiComments:
Style/BlockComments:
Enabled: true
Exclude:
- 'lib/diff.rb'
- 'lib/redmine/string_array_diff/diff.rb'
- 'lib/redmine/string_array_diff/diffable.rb'

Style/BlockDelimiters:
Enabled: true
Exclude:
- 'db/migrate/007_create_journals.rb'
- 'lib/diff.rb'
- 'lib/redmine/string_array_diff/diff.rb'
- 'lib/redmine/string_array_diff/diffable.rb'

Style/EmptyElse:
EnforcedStyle: empty
@@ -160,6 +168,9 @@ Style/FrozenStringLiteralComment:
- 'config.ru'
- 'config/additional_environment.rb'

Style/GlobalStdStream:
Enabled: false

Style/HashEachMethods:
Enabled: true


+ 79
- 35
.rubocop_todo.yml Parādīt failu

@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.17.0.
# using RuboCop version 1.24.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -22,9 +22,10 @@ Layout/DotPosition:
Layout/EmptyLineAfterGuardClause:
Exclude:
- 'db/migrate/101_populate_changesets_user_id.rb'
- 'lib/diff.rb'
- 'lib/redmine/default_data/loader.rb'
- 'lib/redmine/safe_attributes.rb'
- 'lib/redmine/string_array_diff/diff.rb'
- 'lib/redmine/string_array_diff/diffable.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'

# Cop supports --auto-correct.
@@ -146,7 +147,18 @@ Layout/IndentationWidth:
- 'db/migrate/20111201201315_add_unique_index_to_issue_relations.rb'
- 'db/migrate/20120115143126_set_default_repositories.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- 'test/mocks/open_id_authentication_mock.rb'

# Cop supports --auto-correct.
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
Layout/LeadingCommentSpace:
Exclude:
- 'lib/redmine/scm/adapters/cvs_adapter.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/LineEndStringConcatenationIndentation:
Enabled: false

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
@@ -225,12 +237,12 @@ Layout/SpaceBeforeFirstArg:
Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- 'app/models/query.rb'
- 'lib/diff.rb'
- 'lib/redmine/string_array_diff/diff.rb'
- 'test/unit/mailer_localisation_test.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
# SupportedStyles: space, compact, no_space
Layout/SpaceInsideParens:
Exclude:
- 'app/helpers/issues_helper.rb'
@@ -266,6 +278,10 @@ Lint/AmbiguousOperator:
- 'test/unit/custom_field_test.rb'
- 'test/unit/member_test.rb'

# Cop supports --auto-correct.
Lint/AmbiguousOperatorPrecedence:
Enabled: false

# Cop supports --auto-correct.
Lint/AmbiguousRegexpLiteral:
Enabled: false
@@ -327,6 +343,7 @@ Lint/Loop:
Lint/MissingSuper:
Exclude:
- 'app/models/query.rb'
- 'lib/redmine/diff_table.rb'
- 'lib/redmine/scm/adapters/bazaar_adapter.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
@@ -344,6 +361,7 @@ Lint/MixedRegexpCaptureTypes:
Lint/NonDeterministicRequireOrder:
Exclude:
- 'lib/redmine/core_ext.rb'
- 'lib/redmine/twofa.rb'

Lint/OutOfRangeRegexpRef:
Exclude:
@@ -368,7 +386,6 @@ Lint/RedundantStringCoercion:
# Cop supports --auto-correct.
Lint/SendWithMixinArgument:
Exclude:
- 'lib/redmine/acts/positioned.rb'
- 'test/object_helpers.rb'

Lint/ShadowingOuterLocalVariable:
@@ -417,7 +434,8 @@ Naming/ConstantName:
- 'app/models/time_entry_activity.rb'
- 'lib/redmine/helpers/gantt.rb'

# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
@@ -556,7 +574,6 @@ Performance/RedundantSplitRegexpArgument:
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'

# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect.
Performance/StringInclude:
Exclude:
- 'test/functional/versions_controller_test.rb'
@@ -636,7 +653,8 @@ Rails/Blank:

# Cop supports --auto-correct.
Rails/ContentTag:
Enabled: false
Exclude:
- 'lib/redmine/wiki_formatting/markdown/formatter.rb'

# Configuration parameters: Include.
# Include: db/migrate/*.rb
@@ -695,17 +713,14 @@ Rails/FilePath:
- 'app/models/import.rb'
- 'app/models/setting.rb'
- 'config/environment.rb'
- 'config/initializers/00-core_plugins.rb'
- 'config/initializers/10-patches.rb'
- 'lib/redmine/configuration.rb'
- 'lib/redmine/plugin.rb'
- 'lib/redmine/twofa.rb'
- 'lib/redmine/version.rb'
- 'test/application_system_test_case.rb'
- 'test/functional/custom_fields_controller_test.rb'
- 'test/functional/settings_controller_test.rb'
- 'test/test_helper.rb'
- 'test/unit/lib/redmine/configuration_test.rb'
- 'test/unit/lib/redmine/i18n_test.rb'
- 'test/unit/lib/redmine/plugin_test.rb'

@@ -749,10 +764,15 @@ Rails/HasManyOrHasOneDependent:
- 'app/models/document_category.rb'
- 'app/models/issue_priority.rb'
- 'app/models/issue_status.rb'
- 'app/models/principal.rb'
- 'app/models/project.rb'
- 'app/models/repository.rb'
- 'app/models/repository/mercurial.rb'
- 'app/models/time_entry_activity.rb'
- 'app/models/tracker.rb'
- 'app/models/user.rb'
- 'app/models/wiki.rb'
- 'app/models/wiki_page.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
@@ -834,13 +854,15 @@ Rails/MatchRoute:
Rails/NegateInclude:
Enabled: false

# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
Rails/Output:
Exclude:
- 'app/models/mail_handler.rb'
- 'config/routes.rb'
- 'lib/redmine/unified_diff.rb'
- 'lib/redmine/diff.rb'
- 'lib/redmine/diff_table.rb'

Rails/OutputSafety:
Enabled: false
@@ -897,7 +919,6 @@ Rails/ReadWriteAttribute:
- 'app/models/role.rb'
- 'app/models/setting.rb'
- 'app/models/time_entry.rb'
- 'app/models/user.rb'
- 'app/models/user_preference.rb'
- 'app/models/wiki_page.rb'

@@ -909,6 +930,14 @@ Rails/RedundantForeignKey:
- 'app/models/query.rb'
- 'app/models/role.rb'

# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: spec/**/*.rb, test/**/*.rb
Rails/RedundantTravelBack:
Exclude:
- 'test/integration/sudo_mode_test.rb'
- 'test/system/sudo_mode_test.rb'

Rails/ReflectionClassName:
Exclude:
- 'lib/redmine/nested_set/issue_nested_set.rb'
@@ -1009,6 +1038,14 @@ Security/Eval:
- 'app/models/user.rb'
- 'config/initializers/00-core_plugins.rb'

# Cop supports --auto-correct.
Security/IoMethods:
Exclude:
- 'Gemfile'
- 'app/models/attachment.rb'
- 'test/functional/mail_handler_controller_test.rb'
- 'test/unit/mail_handler_test.rb'

Security/Open:
Exclude:
- 'app/models/version.rb'
@@ -1026,8 +1063,8 @@ Security/YAMLLoad:
Style/AccessorGrouping:
Exclude:
- 'app/models/user.rb'
- 'lib/redmine/diff.rb'
- 'lib/redmine/helpers/gantt.rb'
- 'lib/redmine/unified_diff.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
@@ -1070,7 +1107,6 @@ Style/AndOr:
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
- 'lib/redmine/wiki_formatting.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'

# Cop supports --auto-correct.
@@ -1093,6 +1129,7 @@ Style/CaseLikeIf:
- 'app/models/user.rb'
- 'app/models/workflow_transition.rb'
- 'lib/redmine/access_control.rb'
- 'lib/redmine/diff_table.rb'
- 'lib/redmine/export/pdf/issues_pdf_helper.rb'
- 'lib/redmine/field_format.rb'
- 'lib/redmine/i18n.rb'
@@ -1100,7 +1137,6 @@ Style/CaseLikeIf:
- 'lib/redmine/scm/adapters/bazaar_adapter.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'
- 'lib/redmine/unified_diff.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
@@ -1118,7 +1154,7 @@ Style/ClassEqualityComparison:
# Cop supports --auto-correct.
Style/ClassMethods:
Exclude:
- 'lib/diff.rb'
- 'lib/redmine/string_array_diff/diff.rb'

Style/ClassVars:
Exclude:
@@ -1152,7 +1188,6 @@ Style/CollectionCompact:
# Cop supports --auto-correct.
Style/ColonMethodCall:
Exclude:
- 'Gemfile'
- 'app/controllers/admin_controller.rb'
- 'app/models/setting.rb'
- 'lib/redmine/configuration.rb'
@@ -1164,7 +1199,7 @@ Style/ColonMethodCall:

Style/CombinableLoops:
Exclude:
- 'app/models/wiki_page.rb'
- 'app/models/wiki_annotate.rb'
- 'lib/redmine/default_data/loader.rb'

# Cop supports --auto-correct.
@@ -1207,7 +1242,6 @@ Style/EachWithObject:
- 'app/models/setting.rb'
- 'app/models/time_entry_import.rb'
- 'app/models/workflow_permission.rb'
- 'config/initializers/10-patches.rb'
- 'lib/redmine/acts/positioned.rb'
- 'lib/redmine/configuration.rb'
- 'lib/redmine/i18n.rb'
@@ -1260,7 +1294,6 @@ Style/ExplicitBlockArgument:
Style/FormatString:
Exclude:
- 'app/models/query.rb'
- 'config/initializers/10-patches.rb'
- 'lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb'
- 'lib/redmine/export/csv.rb'
- 'lib/redmine/helpers/gantt.rb'
@@ -1288,7 +1321,6 @@ Style/HashAsLastArrayItem:
# Configuration parameters: AllowedReceivers.
Style/HashEachMethods:
Exclude:
- 'app/controllers/application_controller.rb'
- 'app/controllers/groups_controller.rb'
- 'app/models/mailer.rb'
- 'app/models/role.rb'
@@ -1400,7 +1432,7 @@ Style/MultilineIfModifier:
- 'app/models/time_entry_query.rb'
- 'app/views/common/feed.atom.builder'
- 'lib/redmine/helpers/gantt.rb'
- 'lib/redmine/wiki_formatting.rb'
- 'lib/redmine/wiki_formatting/links_helper.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'

# Cop supports --auto-correct.
@@ -1410,6 +1442,7 @@ Style/MultilineTernaryOperator:
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'

# Cop supports --auto-correct.
# Configuration parameters: AllowMethodComparison.
Style/MultipleComparison:
Exclude:
- 'app/helpers/application_helper.rb'
@@ -1435,8 +1468,8 @@ Style/NegatedIf:
- 'app/models/custom_field.rb'
- 'app/models/project.rb'
- 'app/models/repository/cvs.rb'
- 'lib/diff.rb'
- 'lib/redmine/codeset_util.rb'
- 'lib/redmine/string_array_diff/diff.rb'
- 'lib/redmine/thumbnail.rb'

# Cop supports --auto-correct.
@@ -1478,7 +1511,7 @@ Style/NumericLiteralPrefix:
- 'test/unit/user_test.rb'

# Cop supports --auto-correct.
# Configuration parameters: Strict.
# Configuration parameters: Strict, AllowedNumbers.
Style/NumericLiterals:
MinDigits: 9

@@ -1544,7 +1577,7 @@ Style/Proc:
- 'app/models/user.rb'
- 'app/models/wiki_content_version.rb'
- 'config/initializers/10-patches.rb'
- 'lib/redmine.rb'
- 'lib/redmine/preparation.rb'
- 'test/integration/lib/redmine/menu_manager_test.rb'
- 'test/unit/lib/redmine/menu_manager/menu_helper_test.rb'
- 'test/unit/lib/redmine/menu_manager/menu_item_test.rb'
@@ -1561,7 +1594,6 @@ Style/QuotedSymbols:
# Configuration parameters: Methods.
Style/RedundantArgument:
Exclude:
- 'app/controllers/account_controller.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'
- 'test/functional/projects_controller_test.rb'
@@ -1586,7 +1618,6 @@ Style/RedundantBegin:
- 'app/models/repository.rb'
- 'app/models/setting.rb'
- 'lib/redmine/codeset_util.rb'
- 'lib/redmine/plugin.rb'
- 'test/unit/issue_nested_set_concurrency_test.rb'
- 'test/unit/project_nested_set_concurrency_test.rb'
- 'test/unit/query_test.rb'
@@ -1616,7 +1647,7 @@ Style/RedundantInterpolation:
- 'app/views/journals/index.builder'
- 'lib/redmine/helpers/time_report.rb'
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
- 'lib/redmine/wiki_formatting.rb'
- 'lib/redmine/wiki_formatting/links_helper.rb'
- 'test/functional/versions_controller_test.rb'
- 'test/functional/watchers_controller_test.rb'

@@ -1658,6 +1689,11 @@ Style/RedundantSelfAssignment:
Exclude:
- 'lib/redmine/menu_manager.rb'

# Cop supports --auto-correct.
Style/RedundantSelfAssignmentBranch:
Exclude:
- 'lib/redmine/scm/adapters/cvs_adapter.rb'

# Cop supports --auto-correct.
Style/RedundantSort:
Exclude:
@@ -1698,6 +1734,12 @@ Style/RescueStandardError:
Style/SafeNavigation:
Enabled: false

# Cop supports --auto-correct.
Style/SelectByRegexp:
Exclude:
- 'app/models/user.rb'
- 'test/application_system_test_case.rb'

# Cop supports --auto-correct.
Style/SelfAssignment:
Exclude:
@@ -1753,11 +1795,12 @@ Style/SoleNestedConditional:
- 'app/models/user_import.rb'
- 'app/models/version.rb'
- 'app/models/watcher.rb'
- 'app/models/wiki_annotate.rb'
- 'app/models/wiki_page.rb'
- 'lib/redmine/core_ext/active_record.rb'
- 'app/validators/date_validator.rb'

# Cop supports --auto-correct.
# Configuration parameters: .
# Configuration parameters: RequireEnglish.
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names
@@ -1774,6 +1817,7 @@ Style/StringChars:
- 'app/models/user.rb'

# Cop supports --auto-correct.
# Configuration parameters: Mode.
Style/StringConcatenation:
Enabled: false

@@ -1791,7 +1835,7 @@ Style/StringLiteralsInInterpolation:
- 'app/models/issue_query.rb'
- 'config/environment.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- 'lib/redmine/wiki_formatting.rb'
- 'lib/redmine/wiki_formatting/links_helper.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- 'test/unit/member_test.rb'

@@ -1839,8 +1883,8 @@ Style/UnlessElse:
Exclude:
- 'app/controllers/auth_sources_controller.rb'
- 'app/controllers/trackers_controller.rb'
- 'lib/redmine/diff_table.rb'
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
- 'lib/redmine/unified_diff.rb'

# Cop supports --auto-correct.
Style/VariableInterpolation:
@@ -1868,7 +1912,7 @@ Style/ZeroLengthPredicate:
- 'test/unit/custom_field_test.rb'

# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 194

+ 16
- 18
Gemfile Parādīt failu

@@ -1,23 +1,26 @@
source 'https://rubygems.org'

ruby '>= 2.5.0', '< 3.1.0'
ruby '>= 2.5.0', '< 3.2.0'
gem 'bundler', '>= 1.12.0'

gem 'rails', '6.1.4.1'
gem 'rails', '6.1.4.4'
gem 'globalid', '~> 0.4.2' if Gem.ruby_version < Gem::Version.new('2.6.0')
gem 'rouge', '~> 3.26.0'
gem 'rouge', '~> 3.27.0'
gem 'request_store', '~> 1.5.0'
gem 'mini_mime', '~> 1.1.0'
gem "actionpack-xml_parser"
gem 'roadie-rails', '~> 2.2.0'
gem 'roadie-rails', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 2.2.0' : '~> 2.3.0')
gem 'marcel'
gem "mail", "~> 2.7.1"
gem 'csv', '~> 3.2.0'
gem 'nokogiri', '~> 1.12.2'
gem 'nokogiri', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 1.12.2' : '~> 1.13.0')
gem 'i18n', '~> 1.8.2'
gem "rbpdf", "~> 1.20.0"
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'
gem 'net-smtp', '~> 0.3.0'
gem 'net-imap', '~> 0.2.2'
gem 'net-pop', '~> 0.1.1'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
@@ -31,12 +34,6 @@ group :ldap do
gem 'net-ldap', '~> 0.17.0'
end

# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.9.2", :require => "openid"
gem "rack-openid"
end

# Optional gem for exporting the gantt to a PNG file
group :minimagick do
gem 'mini_magick', '~> 4.11.0'
@@ -87,6 +84,7 @@ else
end

group :development do
gem 'listen', '~> 3.3'
gem "yard"
end

@@ -97,17 +95,17 @@ group :test do
gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
# For running system tests
gem 'puma'
gem 'capybara', '~> 3.35.3'
gem "selenium-webdriver"
gem 'webdrivers', '~> 4.4', require: false
gem 'capybara', (Gem.ruby_version < Gem::Version.new('2.6.0') ? '~> 3.35.3' : '~> 3.36.0')
gem "selenium-webdriver", "~> 3.142.7"
gem 'webdrivers', '4.6.1', require: false
# RuboCop
gem 'rubocop', '~> 1.17.0'
gem 'rubocop-performance', '~> 1.11.0'
gem 'rubocop-rails', '~> 2.11.0'
gem 'rubocop', '~> 1.24.0'
gem 'rubocop-performance', '~> 1.13.0'
gem 'rubocop-rails', '~> 2.13.0'
end

local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
if File.exist?(local_gemfile)
eval_gemfile local_gemfile
end


+ 3
- 58
app/controllers/account_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -27,14 +27,6 @@ class AccountController < ApplicationController
skip_before_action :check_if_login_required, :check_password_change
skip_before_action :check_twofa_activation, :only => :logout

# Overrides ApplicationController#verify_authenticity_token to disable
# token verification on openid callbacks
def verify_authenticity_token
unless using_open_id?
super
end
end

# Login request and validation
def login
if request.post?
@@ -161,7 +153,7 @@ class AccountController < ApplicationController
redirect_to my_account_path
end
else
unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank?
unless user_params[:password].blank? && user_params[:password_confirmation].blank?
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
end

@@ -301,11 +293,7 @@ class AccountController < ApplicationController
end

def authenticate_user
if Setting.openid? && using_open_id?
open_id_authenticate(params[:openid_url])
else
password_authentication
end
password_authentication
end

def password_authentication
@@ -339,49 +327,6 @@ class AccountController < ApplicationController
update_sudo_timestamp! # activate Sudo Mode
end

def open_id_authenticate(openid_url)
back_url = signin_url(:autologin => params[:autologin])
authenticate_with_open_id(
openid_url, :required => [:nickname, :fullname, :email],
:return_to => back_url, :method => :post
) do |result, identity_url, registration|
if result.successful?
user = User.find_or_initialize_by_identity_url(identity_url)
if user.new_record?
# Self-registration off
(redirect_to(home_url); return) unless Setting.self_registration?
# Create on the fly
user.login = registration['nickname'] unless registration['nickname'].nil?
user.mail = registration['email'] unless registration['email'].nil?
user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil?
user.random_password
user.register
case Setting.self_registration
when '1'
register_by_email_activation(user) do
onthefly_creation_failed(user)
end
when '3'
register_automatically(user) do
onthefly_creation_failed(user)
end
else
register_manually_by_administrator(user) do
onthefly_creation_failed(user)
end
end
else
# Existing record
if user.active?
successful_authentication(user)
else
handle_inactive_user(user)
end
end
end
end
end

def successful_authentication(user)
logger.info "Successful authentication for '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}"
# Valid user

+ 1
- 1
app/controllers/activities_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/admin_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/application_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 2
- 2
app/controllers/attachments_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -225,7 +225,7 @@ class AttachmentsController < ApplicationController
rescue
nil
end
unless klass && klass.reflect_on_association(:attachments)
unless klass && (klass.reflect_on_association(:attachments) || klass.method_defined?(:attachments))
render_404
return
end

+ 1
- 1
app/controllers/auth_sources_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/auto_completes_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/boards_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/calendars_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/comments_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/context_menus_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/custom_field_enumerations_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/custom_fields_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/documents_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/email_addresses_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/enumerations_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/files_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 2
- 2
app/controllers/gantts_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -41,7 +41,7 @@ class GanttsController < ApplicationController

respond_to do |format|
format.html {render :action => "show", :layout => !request.xhr?}
if @gantt.respond_to?('to_image')
if @gantt.respond_to?(:to_image)
format.png do
send_data(@gantt.to_image,
:disposition => 'inline', :type => 'image/png',

+ 1
- 1
app/controllers/groups_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/imports_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/issue_categories_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/issue_relations_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/issue_statuses_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 3
- 1
app/controllers/issues_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -701,6 +701,8 @@ class IssuesController < ApplicationController
url_params[:issue][:project_id] = @issue.project_id
redirect_to new_issue_path(url_params)
end
elsif params[:follow]
redirect_to issue_path(@issue)
else
redirect_back_or_default issue_path(@issue)
end

+ 2
- 1
app/controllers/journals_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -28,6 +28,7 @@ class JournalsController < ApplicationController
helper :issues
helper :custom_fields
helper :queries
helper :attachments
include QueriesHelper

def index

+ 1
- 1
app/controllers/mail_handler_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/members_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/messages_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/my_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/news_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/previews_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/principal_memberships_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/project_enumerations_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 17
- 1
app/controllers/projects_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -51,6 +51,7 @@ class ProjectsController < ApplicationController
return
end

retrieve_default_query
retrieve_project_query
scope = project_scope

@@ -323,4 +324,19 @@ class ProjectsController < ApplicationController
def retrieve_project_query
retrieve_query(ProjectQuery, false, :defaults => @default_columns_names)
end

def retrieve_default_query
return if params[:query_id].present?
return if api_request?
return if params[:set_filter] && (params.key?(:op) || params.key?(:f))

if params[:without_default].present?
params[:set_filter] = 1
return
end

if default_query = ProjectQuery.default
params[:query_id] = default_query.id
end
end
end

+ 1
- 1
app/controllers/queries_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 7
- 7
app/controllers/reports_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -24,10 +24,10 @@ class ReportsController < ApplicationController
def issue_report
with_subprojects = Setting.display_subprojects_issues?
@trackers = @project.rolled_up_trackers(with_subprojects).visible
@versions = @project.shared_versions.sorted
@versions = @project.shared_versions.sorted + [Version.new(:name => "[#{l(:label_none)}]")]
@priorities = IssuePriority.all.reverse
@categories = @project.issue_categories
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
@categories = @project.issue_categories + [IssueCategory.new(:name => "[#{l(:label_none)}]")]
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted + [User.new(:firstname => "[#{l(:label_none)}]")]
@authors = @project.users.sorted
@subprojects = @project.descendants.visible
@issues_by_tracker = Issue.by_tracker(@project, with_subprojects)
@@ -51,7 +51,7 @@ class ReportsController < ApplicationController
@report_title = l(:field_tracker)
when "version"
@field = "fixed_version_id"
@rows = @project.shared_versions.sorted
@rows = @project.shared_versions.sorted + [Version.new(:name => "[#{l(:label_none)}]")]
@data = Issue.by_version(@project, with_subprojects)
@report_title = l(:field_version)
when "priority"
@@ -61,12 +61,12 @@ class ReportsController < ApplicationController
@report_title = l(:field_priority)
when "category"
@field = "category_id"
@rows = @project.issue_categories
@rows = @project.issue_categories + [IssueCategory.new(:name => "[#{l(:label_none)}]")]
@data = Issue.by_category(@project, with_subprojects)
@report_title = l(:field_category)
when "assigned_to"
@field = "assigned_to_id"
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted + [User.new(:firstname => "[#{l(:label_none)}]")]
@data = Issue.by_assigned_to(@project, with_subprojects)
@report_title = l(:field_assigned_to)
when "author"

+ 1
- 1
app/controllers/repositories_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/roles_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/search_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/settings_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/sys_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/timelog_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/trackers_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/twofa_backup_codes_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/twofa_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/users_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/versions_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/watchers_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/welcome_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/wiki_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/wikis_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/controllers/workflows_controller.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/account_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/activities_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/admin_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 9
- 4
app/helpers/application_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -320,7 +320,8 @@ module ApplicationHelper
image_tag(
thumbnail_path(attachment),
:srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x",
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;"
:style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;",
:loading => "lazy"
),
attachment_path(
attachment
@@ -931,7 +932,11 @@ module ApplicationHelper

# when using an image link, try to use an attachment, if possible
attachments = options[:attachments] || []
attachments += obj.attachments if obj.respond_to?(:attachments)
if obj.is_a?(Journal)
attachments += obj.journalized.attachments if obj.journalized.respond_to?(:attachments)
else
attachments += obj.attachments if obj.respond_to?(:attachments)
end
if attachments.present?
text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m|
filename, ext, alt, alttext = $1, $2, $3, $4
@@ -942,7 +947,7 @@ module ApplicationHelper
if !desc.blank? && alttext.blank?
alt = " title=\"#{desc}\" alt=\"#{desc}\""
end
"src=\"#{image_url}\"#{alt}"
"src=\"#{image_url}\"#{alt} loading=\"lazy\""
else
m
end

+ 1
- 1
app/helpers/attachments_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/auth_sources_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/avatars_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/boards_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/calendars_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/context_menus_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/custom_fields_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/documents_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/email_addresses_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/enumerations_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/gantt_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/groups_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/imports_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/issue_categories_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/issue_relations_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/issue_statuses_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 7
- 1
app/helpers/issues_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -547,6 +547,12 @@ module IssuesHelper
value = "##{detail.value}" unless detail.value.blank?
old_value = "##{detail.old_value}" unless detail.old_value.blank?

when 'child_id'
label = l(:label_subtask)
value = "##{detail.value}" unless detail.value.blank?
old_value = "##{detail.old_value}" unless detail.old_value.blank?
multiple = true

when 'is_private'
value = l(detail.value == "0" ? :general_text_No : :general_text_Yes) unless detail.value.blank?
old_value = l(detail.old_value == "0" ? :general_text_No : :general_text_Yes) unless detail.old_value.blank?

+ 11
- 2
app/helpers/journals_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -32,6 +32,14 @@ module JournalsHelper
indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice

dropbown_links << copy_object_url_link(issue_url(issue, anchor: "note-#{indice}", only_path: false))
if journal.attachments.size > 1
dropbown_links << link_to(l(:label_download_all_attachments),
container_attachments_download_path(journal),
:title => l(:label_download_all_attachments),
:class => 'icon icon-download'
)
end

if journal.notes.present?
if options[:reply_links]
links << link_to(l(:button_quote),
@@ -53,7 +61,8 @@ module JournalsHelper
dropbown_links << link_to(l(:button_delete),
journal_path(journal, :journal => {:notes => ""}),
:remote => true,
:method => 'put', :data => {:confirm => l(:text_are_you_sure)},
:method => 'put',
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
)
end

+ 1
- 1
app/helpers/mail_handler_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/members_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/messages_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/my_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/news_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/principal_memberships_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/projects_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/projects_queries_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/queries_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 2
- 2
app/helpers/reports_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -41,7 +41,7 @@ module ReportsHelper
end

def aggregate_path(project, field, row, options={})
parameters = {:set_filter => 1, :subproject_id => '!*', field => row.id}.merge(options)
parameters = {:set_filter => 1, :subproject_id => '!*', field => (row.id || '!*')}.merge(options)
project_issues_path(row.is_a?(Project) ? row : project, parameters)
end
end

+ 1
- 1
app/helpers/repositories_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/roles_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/routes_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/search_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 5
- 1
app/helpers/settings_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -170,6 +170,10 @@ module SettingsHelper
[[l(:label_none), '']] + IssueQuery.only_public.where(project_id: nil).pluck(:name, :id)
end

def default_global_project_query_options
[[l(:label_none), '']] + ProjectQuery.only_public.pluck(:name, :id)
end

def cross_project_subtasks_options
options = [
[:label_disabled, ''],

+ 1
- 1
app/helpers/timelog_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/trackers_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/twofa_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 13
- 1
app/helpers/users_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -41,6 +41,18 @@ module UsersHelper
grouped_options_for_select(grouped, user.pref.default_issue_query)
end

def default_project_query_options(user)
global_queries = ProjectQuery
global_public_queries = global_queries.only_public
global_user_queries = global_queries.where(user_id: user.id).where.not(id: global_public_queries.ids)
label = user == User.current ? 'label_my_queries' : 'label_default_queries.for_this_user'
grouped = {
l('label_default_queries.for_all_users') => global_public_queries.pluck(:name, :id),
l(".#{label}") => global_user_queries.pluck(:name, :id),
}
grouped_options_for_select(grouped, user.pref.default_project_query)
end

def textarea_font_options
[[l(:label_font_default), '']] + UserPreference::TEXTAREA_FONT_OPTIONS.map {|o| [l("label_font_#{o}"), o]}
end

+ 1
- 1
app/helpers/versions_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/watchers_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 1
- 1
app/helpers/welcome_helper.rb Parādīt failu

@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Redmine - project management software
# Copyright (C) 2006-2021 Jean-Philippe Lang
# Copyright (C) 2006-2022 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

+ 0
- 0
app/helpers/wiki_helper.rb Parādīt failu


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels

Notiek ielāde…
Atcelt
Saglabāt