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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#63873] rework enterprise page for subject configuration
Eric Schubert6ff6903783a6
diff --git a/app/assets/images/enterprise/automatically-generated-subjects.png b/app/assets/images/enterprise/automatically-generated-subjects.pngnew file mode 100644index 00000000000..7fa3763c32dBinary files /dev/null and b/app/assets/images/enterprise/automatically-generated-subjects.png differdiff --git a/app/assets/videos/enterprise/automatically_generated_subjects.mp4 b/app/assets/videos/enterprise/automatically_generated_subjects.mp4new file mode 100644index 00000000000..87016b4cae1Binary files /dev/null and b/app/assets/videos/enterprise/automatically_generated_subjects.mp4 differdiff --git a/app/components/work_package_types/subject_configuration_component.html.erb b/app/components/work_package_types/subject_configuration_component.html.erbindex 6fff3153b36..6c9c624a5c4 100644--- a/app/components/work_package_types/subject_configuration_component.html.erb+++ b/app/components/work_package_types/subject_configuration_component.html.erb@@ -27,12 +27,26 @@ See COPYRIGHT and LICENSE files for more details.++#%>-<%=- render(EnterpriseEdition::BannerComponent.new(:work_package_subject_generation))-%>--<%=- settings_primer_form_with(**form_options) do |f|- render(WorkPackageTypes::SubjectConfigurationForm.new(f))- end-%>+<% if show_upsale_page? %>+ <%= render(+ EnterpriseEdition::BannerComponent.new(+ :work_package_subject_generation,+ variant: :large,+ video: "enterprise/automatically_generated_subjects.mp4"+ )+ ) %>+<% else %>+ <%= render(+ EnterpriseEdition::BannerComponent.new(+ :work_package_subject_generation,+ variant: :medium,+ image: "enterprise/automatically-generated-subjects.png"+ )+ ) %>++ <%=+ settings_primer_form_with(**form_options) do |f|+ render(WorkPackageTypes::SubjectConfigurationForm.new(f))+ end+ %>+<% end %>diff --git a/app/components/work_package_types/subject_configuration_component.rb b/app/components/work_package_types/subject_configuration_component.rbindex 1e0eb784468..5ec45d29c7d 100644--- a/app/components/work_package_types/subject_configuration_component.rb+++ b/app/components/work_package_types/subject_configuration_component.rb@@ -23,7 +23,7 @@## 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.+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.## See COPYRIGHT and LICENSE files for more details.#++@@ -53,8 +53,16 @@ module WorkPackageTypes}end+ def show_upsale_page?+ !enterprise? && subject_form_object.subject_configuration == :manual+ end+private+ def enterprise?+ EnterpriseToken.allows_to?(:work_package_subject_generation)+ end+def subject_form_objectvalues = subject_configuration_form_valuesdiff --git a/app/forms/work_package_types/subject_configuration_form.rb b/app/forms/work_package_types/subject_configuration_form.rbindex 046c0d39524..12fb12aa513 100644--- a/app/forms/work_package_types/subject_configuration_form.rb+++ b/app/forms/work_package_types/subject_configuration_form.rb@@ -44,7 +44,7 @@ module WorkPackageTypeschecked: !subject_configuration_manual?,label: I18n.t("types.edit.subject_configuration.automatically_generated_subjects.label"),caption: I18n.t("types.edit.subject_configuration.automatically_generated_subjects.caption"),- disabled: !enterprise? && subject_configuration_manual?,+ disabled: !enterprise?,data: { action: "admin--subject-configuration#showPatternInput" })end@@ -53,6 +53,7 @@ module WorkPackageTypestoggleable_group.pattern_input(name: :pattern,value: model.pattern,+ hidden: !enterprise?,suggestions: model.suggestions,label: I18n.t("types.edit.subject_configuration.pattern.label"),caption: pattern_input_caption,