From: Jean-Philippe Lang Date: Sat, 7 Nov 2015 13:37:08 +0000 (+0000) Subject: Responsive layout for mobile devices (#19097). X-Git-Tag: 3.2.0~69 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e680ae1aa31b9a48fb6a94b3a728ff962102bd42;p=redmine.git Responsive layout for mobile devices (#19097). Patch by Felix Gliesche. git-svn-id: http://svn.redmine.org/redmine/trunk@14817 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c345083b7..fce5d6e22 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -340,6 +340,7 @@ module ApplicationHelper { :value => project_path(:id => p, :jump => current_menu_item) } end + content_tag( :span, nil, :class => 'jump-box-arrow') + select_tag('project_quick_jump_box', options, :onchange => 'if (this.value != \'\') { window.location = this.value; }') end end @@ -1267,7 +1268,7 @@ module ApplicationHelper # Returns the javascript tags that are included in the html layout head def javascript_heads - tags = javascript_include_tag('jquery-1.11.1-ui-1.11.0-ujs-3.1.4', 'application') + tags = javascript_include_tag('jquery-1.11.1-ui-1.11.0-ujs-3.1.4', 'application', 'responsive') unless User.current.pref.warn_on_leaving_unsaved == '0' tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });") end diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index b1ffcaf13..147749290 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -4,11 +4,12 @@ <%= html_title %> + <%= csrf_meta_tag %> <%= favicon %> -<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'application', :media => 'all' %> +<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'application', 'responsive', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= heads_for_theme %> @@ -18,6 +19,44 @@
+ +
+ + + <% if User.current.logged? || !Setting.login_required? %> + + <% end %> + + <% if User.current.logged? %> +
+ <% if Setting.gravatar_enabled? %> + <%= link_to(avatar(User.current, :size => "80"), user_path(User.current)) %> + <% end %> + <%= link_to_user(User.current, :format => :username) %> +
+ <% end %> + + <% if display_main_menu?(@project) %> +

<%= l(:label_project) %>

+ + <% end %> + +

<%= l(:label_general) %>

+ + + + +

<%= l(:label_profile) %>

+ + +
+
@@ -29,6 +68,9 @@