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
Hide some buttons on mobile and correct HTML structure
Henriette Dinger2e514679138d
diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erbindex 7335a3dba82..0da3a322992 100644--- a/app/views/messages/show.html.erb+++ b/app/views/messages/show.html.erb@@ -33,10 +33,10 @@ See docs/COPYRIGHT.rdoc for more details.%><% title avatar(@topic.author) + h(@topic.subject) %><%= toolbar title: title do %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= watcher_link(@topic, User.current) %></li>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><% if [email protected]? && authorize_for('messages', 'reply') %><%= link_to({ action: 'quote', id: @topic }, class: 'boards--quote-button button') do %><%= op_icon('button--icon icon-quote') %>diff --git a/app/views/users/_toolbar.html.erb b/app/views/users/_toolbar.html.erbindex 93e54192733..ff4f5de7e5f 100644--- a/app/views/users/_toolbar.html.erb+++ b/app/views/users/_toolbar.html.erb@@ -29,7 +29,7 @@ See docs/COPYRIGHT.rdoc for more details.<%= breadcrumb_toolbar(@user.new_record? ? l(:label_user_new) : @user.name) do %><% unless @user.new_record? %><% if current_user.admin? || current_user.id == @user.id %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= form_for(@user, html: { class: 'toolbar-item'},url: { action: :resend_invitation },method: :post) do |_form| %>@@ -47,7 +47,7 @@ See docs/COPYRIGHT.rdoc for more details.<% end %></li><% unless current_user.id == @user.id %>- <%= form_for @user, html: { class: 'toolbar-item' }, :url => {:action => :change_status},+ <%= form_for @user, html: { class: 'toolbar-item hidden-for-mobile' }, :url => {:action => :change_status},:method => :post do %><li><%= change_user_status_buttons(@user) %>diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erbindex d2b662c33bb..de948a72a0b 100644--- a/app/views/versions/show.html.erb+++ b/app/views/versions/show.html.erb@@ -37,7 +37,7 @@ See docs/COPYRIGHT.rdoc for more details.</li><% end %><% if authorize_for(:wiki, :edit) && !(@version.wiki_page_title.blank? || @version.project.wiki.nil?) %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= link_to({controller: '/wiki', action: 'edit',project_id: @version.project,id: @version.wiki_page_title},diff --git a/app/views/workflows/_toolbar.html.erb b/app/views/workflows/_toolbar.html.erbindex fee634bcab7..95b3a4702ff 100644--- a/app/views/workflows/_toolbar.html.erb+++ b/app/views/workflows/_toolbar.html.erb@@ -28,7 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><%= toolbar title: title do %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= link_to({ action: 'copy' }, class: 'button') do %><%= op_icon('button--icon icon-copy') %><span class="button--text"><%= l(:button_copy) %></span>diff --git a/modules/costs/app/views/cost_objects/show.html.erb b/modules/costs/app/views/cost_objects/show.html.erbindex ef6b66146a0..ee5bd360550 100644--- a/modules/costs/app/views/cost_objects/show.html.erb+++ b/modules/costs/app/views/cost_objects/show.html.erb@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</li><% end %><% if authorize_for(:cost_objects, :copy) %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= link_to({ controller: 'cost_objects', action: 'copy', id: @cost_object }, class: 'button') do %><%= op_icon('button--icon icon-copy') %><span class="button--text"><%= l(:button_copy) %></span>diff --git a/modules/meeting/app/helpers/meeting_contents_helper.rb b/modules/meeting/app/helpers/meeting_contents_helper.rbindex d50c64b1eb4..52a9134c928 100644--- a/modules/meeting/app/helpers/meeting_contents_helper.rb+++ b/modules/meeting/app/helpers/meeting_contents_helper.rb@@ -55,22 +55,26 @@ module MeetingContentsHelpercase content_typewhen 'meeting_agenda'content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_meeting_close),- { controller: '/meeting_agendas',+ link_to_if_authorized({ controller: '/meeting_agendas',action: 'close',meeting_id: meeting },method: :put,data: { confirm: I18n.t(:text_meeting_closing_are_you_sure) },- class: 'meetings--close-meeting-button button icon-context icon-locked'+ class: 'meetings--close-meeting-button button') do+ op_icon('button--icon icon-locked') ++ content_tag('span', l(:label_meeting_close), class: 'button--text')+ endendwhen 'meeting_minutes'content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_meeting_agenda_close),- { controller: '/meeting_agendas',+ link_to_if_authorized({ controller: '/meeting_agendas',action: 'close',meeting_id: meeting },method: :put,- class: 'button icon-context icon-locked'+ class: 'button') do+ op_icon('button--icon icon-locked') ++ content_tag('span', l(:label_meeting_agenda_close), class: 'button--text')+ endendendend@@ -79,13 +83,15 @@ module MeetingContentsHelpercase content_typewhen 'meeting_agenda'content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_meeting_open),- { controller: '/meeting_agendas',+ link_to_if_authorized({ controller: '/meeting_agendas',action: 'open',meeting_id: meeting },method: :put,- class: 'button icon-context icon-unlocked',- confirm: l(:text_meeting_agenda_open_are_you_sure)+ class: 'button',+ confirm: l(:text_meeting_agenda_open_are_you_sure)) do+ op_icon('button--icon icon-unlocked') ++ content_tag('span', l(:label_meeting_open), class: 'button--text')+ endendwhen 'meeting_minutes'end@@ -93,46 +99,51 @@ module MeetingContentsHelperdef meeting_content_edit_link(content_type)content_tag :li, '', class: 'toolbar-item' do-- content_tag :button,- '',- data: { 'content-type': content_type },- class: 'button button--edit-agenda' do- link_to l(:button_edit),- '',- class: 'icon-context icon-edit',- accesskey: accesskey(:edit)- end+ link_to '',+ class: 'button button--edit-agenda',+ data: { 'content-type': content_type },+ accesskey: accesskey(:edit) do+ op_icon('button--icon icon-edit') ++ content_tag('span', l(:label_edit), class: 'button--text')+ endendenddef meeting_content_history_link(content_type, meeting)content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_history),- { controller: '/' + content_type.pluralize,+ link_to_if_authorized({ controller: '/' + content_type.pluralize,action: 'history',meeting_id: meeting },- class: 'button icon-context icon-wiki'+ aria: { label: t(:label_history) },+ title: t(:label_history),+ class: 'button') do+ op_icon('button--icon icon-wiki') ++ content_tag('span', l(:label_history), class: 'button--text')+ endendenddef meeting_content_notify_link(content_type, meeting)content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_notify),- { controller: '/' + content_type.pluralize,+ link_to_if_authorized({ controller: '/' + content_type.pluralize,action: 'notify', meeting_id: meeting },method: :put,- class: 'button icon-context icon-mail1'+ class: 'button') do+ op_icon('button--icon icon-mail1') ++ content_tag('span', l(:label_notify), class: 'button--text')+ endendenddef meeting_content_icalendar_link(content_type, meeting)content_tag :li, '', class: 'toolbar-item' do- link_to_if_authorized l(:label_icalendar),- { controller: '/' + content_type.pluralize,+ link_to_if_authorized({ controller: '/' + content_type.pluralize,action: 'icalendar', meeting_id: meeting },method: :put,- class: 'button icon-context icon-calendar2'+ class: 'button') do+ op_icon('button--icon icon-calendar2') ++ content_tag('span', l(:label_icalendar), class: 'button--text')+ endendendenddiff --git a/modules/meeting/app/views/meetings/show.html.erb b/modules/meeting/app/views/meetings/show.html.erbindex 71d5932bca3..1607fa85428 100644--- a/modules/meeting/app/views/meetings/show.html.erb+++ b/modules/meeting/app/views/meetings/show.html.erb@@ -24,7 +24,7 @@ See doc/COPYRIGHT.md for more details.link_to: link_to(@meeting),html: { class: 'meeting--main-toolbar' } do %><% unless User.current.anonymous? %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><div class="button"><%= watcher_link @meeting, User.current %></div>@@ -39,7 +39,7 @@ See doc/COPYRIGHT.md for more details.</li><% end %><% if authorize_for(:meetings, :copy) %>- <li class="toolbar-item">+ <li class="toolbar-item hidden-for-mobile"><%= link_to({:controller => '/meetings', :action => 'copy', :id => @meeting}, class: 'button') do %><%= op_icon('button--icon icon-copy') %><span class="button--text"><%= l(:button_copy) %></span>diff --git a/modules/meeting/spec/features/meetings_attachments_spec.rb b/modules/meeting/spec/features/meetings_attachments_spec.rbindex 7eb7a5b68b1..847b4b650ff 100644--- a/modules/meeting/spec/features/meetings_attachments_spec.rb+++ b/modules/meeting/spec/features/meetings_attachments_spec.rb@@ -31,7 +31,7 @@ describe 'Add an attachment to a meeting (agenda)', js: true dovisit "/meetings/#{meeting.id}"within "#tab-content-agenda .toolbar" do- click_button "Edit"+ click_link "Edit"endend