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
change page header in forum index page and change class of watcher link to look same as other primer buttons
Behrokh Satarnejad93a78fa247b5
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rbindex 22e7fb2743b..42c2cabf298 100644--- a/app/helpers/watchers_helper.rb+++ b/app/helpers/watchers_helper.rb@@ -42,7 +42,7 @@ module WatchersHelperpath = send(:"#{(watched ? 'unwatch' : 'watch')}_path", object_type: object.class.to_s.underscore.pluralize,object_id: object.id,replace: options.delete("replace"))- html_options[:class] = html_options[:class].to_s + " button"+ html_options[:class] = "#{html_options[:class]} Button--secondary Button"method = watched ? :delete : :postdiff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erbindex cf7cc4615d4..a4dc5faad6d 100644--- a/app/views/forums/show.html.erb+++ b/app/views/forums/show.html.erb@@ -46,24 +46,36 @@ See COPYRIGHT and LICENSE files for more details.<% end %></div>-<%= toolbar title: @forum.name, subtitle: format_text(@forum.description) do %>- <% if authorize_for(:messages, :new) %>- <li class="toolbar-item">- <%= link_to({controller: '/messages', action: 'new', forum_id: @forum},- {class: 'add-message-button button -primary',- aria: {label: t(:label_message_new)},- title: t(:label_message_new)}) do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= t(:label_message) %></span>- <% end %>- <% csp_onclick('jQuery("#add-message").show(); jQuery("#message_subject").focus();', '.add-message-button') %>- </li>- <% end %>- <% unless User.current.anonymous? %>- <li class="toolbar-item">- <%= watcher_link(@forum, User.current) %>- </li>- <% end %>+<%=+ render(Primer::OpenProject::PageHeader.new) do |header|+ header.with_title { @forum.name }+ header.with_description { @forum.description }+ header.with_breadcrumbs([{ href: project_overview_path(@project.id), text: @project.name },+ { href: project_forums_path, text: t(:label_forum_plural) },+ @forum.name])+ end+%>+<% if authorize_for(:messages, :new) %>+ <%=+ render(Primer::OpenProject::SubHeader.new) do |subheader|+ if authorize_for(:messages, :new)+ subheader.with_action_button(scheme: :primary,+ aria: { label: t(:label_message_new) },+ title: t(:label_message_new),+ tag: :a,+ class: 'add-message-button',+ href: url_for({controller: '/messages', action: 'new', forum_id: @forum})) do |button|+ button.with_leading_visual_icon(icon: :plus)+ t(:label_message)+ end+ end+ unless User.current.anonymous?+ subheader.with_action_component do+ watcher_link(@forum, User.current)+ end+ end+ end+ %><% end %><% if @topics.any? %>diff --git a/modules/budgets/app/views/budgets/index.html.erb b/modules/budgets/app/views/budgets/index.html.erbindex 346f910c477..818114a476f 100644--- a/modules/budgets/app/views/budgets/index.html.erb+++ b/modules/budgets/app/views/budgets/index.html.erb@@ -48,7 +48,6 @@ See COPYRIGHT and LICENSE files for more details.end%>-<% if @budgets.empty? %><%= no_results_box %><% else %>