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
update page header in version page
Behrokh Satarnejad4a8adaf94270
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erbindex ffb4536f5ef..21a4bff1aee 100644--- a/app/views/news/edit.html.erb+++ b/app/views/news/edit.html.erb@@ -30,7 +30,7 @@ See COPYRIGHT and LICENSE files for more details.<% html_title t(:label_news_edit) %><%=render Primer::OpenProject::PageHeader.new do |header|- header.with_title {@news.title }+ header.with_title { @news.title }header.with_breadcrumbs([*([ href: home_path, text: organization_name ] unless @project),*([ href: project_overview_path(@project.id), text: @project.name ] if @project),*([ href: project_news_index_path(@project.id), text: t(:label_news_plural) ] if @project),diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erbindex 63198f80c00..ba1a3aab1d8 100644--- a/app/views/versions/show.html.erb+++ b/app/views/versions/show.html.erb@@ -26,40 +26,57 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See COPYRIGHT and LICENSE files for more details.++#%>--<%= toolbar title: @version.name do %>- <% if authorize_for(:versions, :edit) %>- <li class="toolbar-item">- <%= link_to(edit_version_path(@version), class: 'button') do %>- <%= op_icon('button--icon icon-edit') %>- <span class="button--text"><%= t(:button_edit) %></span>- <% end %>- </li>- <% end %>- <% if authorize_for(:versions, :destroy) %>- <li class="toolbar-item">- <%= link_to version_path(@version),- method: :delete,- data: { confirm: t(:text_are_you_sure) },- class: "button -danger" do %>- <%= op_icon 'button--icon icon-delete' %>- <span class="button--text"><%= t(:button_delete) %></span>- <% end %>- </li>- <% end %>- <% if authorize_for(:wiki, :edit) && !(@version.wiki_page_title.blank? || @version.project.wiki.nil?) %>- <li class="toolbar-item hidden-for-tablet">- <%= link_to({ controller: '/wiki', action: 'edit',- project_id: @version.project,- id: @version.wiki_page_title },- class: 'button') do %>- <%= op_icon('button--icon icon-edit') %>- <span class="button--text"><%= t(:button_edit_associated_wikipage, page_title: truncate(@version.wiki_page_title, length: 50, separator: ' ')) %></span>- <% end %>- </li>- <% end %>- <%= call_hook(:view_versions_show_contextual, { version: @version, project: @project }) %>-<% end %>+<%=+ render Primer::OpenProject::PageHeader.new do |header|+ header.with_title { @version.name }+ header.with_breadcrumbs( [{ href: project_overview_path(@project.id), text: @project.name },+ { href: project_settings_general_path(@project.id), text: I18n.t("label_project_settings") },+ { href: project_settings_versions_path(@project.id), text: I18n.t("label_version_plural") },+ @version.name+ ])+ if authorize_for(:versions, :edit)+ header.with_action_button(tag: :a,+ mobile_icon: :pencil,+ mobile_label: t(:button_edit),+ size: :medium,+ href: edit_version_path(@version),+ aria: { label: I18n.t(:button_edit) },+ title: I18n.t(:button_edit)) do |button|+ button.with_leading_visual_icon(icon: :pencil)+ t(:button_edit)+ end+ end+ if authorize_for(:versions, :destroy)+ header.with_action_button(tag: :a,+ scheme: :danger,+ mobile_icon: :trash,+ mobile_label: t(:button_delete),+ size: :medium,+ href: version_path(@version),+ aria: { label: I18n.t(:button_delete) },+ data: {+ confirm: I18n.t(:text_are_you_sure),+ method: :delete+ },+ title: I18n.t(:button_delete)) do |button|+ button.with_leading_visual_icon(icon: :trash)+ t(:button_delete)+ end+ end+ if authorize_for(:wiki, :edit) && !(@version.wiki_page_title.blank? || @version.project.wiki.nil?)+ header.with_action_button(tag: :a,+ mobile_icon: :pencil,+ mobile_label: t(:button_edit_associated_wikipage, page_title: truncate(@version.wiki_page_title, length: 50, separator: ' ')),+ size: :medium,+ href: url_for({ controller: '/wiki', action: 'edit', project_id: @version.project, id: @version.wiki_page_title }),+ aria: { label: t(:button_edit_associated_wikipage, page_title: truncate(@version.wiki_page_title, length: 50, separator: ' ')) },+ title: t(:button_edit_associated_wikipage, page_title: truncate(@version.wiki_page_title, length: 50, separator: ' '))) do |button|+ button.with_leading_visual_icon(icon: :pencil)+ t(:button_edit_associated_wikipage, page_title: truncate(@version.wiki_page_title, length: 50, separator: ' '))+ end+ end+ call_hook(:view_versions_show_contextual, { version: @version, project: @project })+ end %><div class="widget-boxes -grid"><div class="widget-box -thin">diff --git a/modules/backlogs/app/views/rb_taskboards/show.html.erb b/modules/backlogs/app/views/rb_taskboards/show.html.erbindex c2430ce7b95..ad5c7d12ebe 100644--- a/modules/backlogs/app/views/rb_taskboards/show.html.erb+++ b/modules/backlogs/app/views/rb_taskboards/show.html.erb@@ -31,9 +31,8 @@ See COPYRIGHT and LICENSE files for more details.<%=render Primer::OpenProject::PageHeader.new do |header|header.with_title { @sprint.name }- header.with_breadcrumbs([*([ href: home_path, text: organization_name ] unless @project),- *([ href: project_overview_path(@project.id), text: @project.name ] if @project),- *([ href: backlogs_project_backlogs_path(@project), text: t(:label_backlogs) ] if @project),+ header.with_breadcrumbs([{ href: project_overview_path(@project.id), text: @project.name },+ { href: backlogs_project_backlogs_path(@project), text: t(:label_backlogs) },@sprint.name])end%>