diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-07 13:37:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-07 13:37:08 +0000 |
commit | e680ae1aa31b9a48fb6a94b3a728ff962102bd42 (patch) | |
tree | 7956fb1a78a8cf8647a3348eacb2cd516ef1c724 /app/views | |
parent | 9c85a341ca01b8af0f7b157f7aa011a048341a9d (diff) | |
download | redmine-e680ae1aa31b9a48fb6a94b3a728ff962102bd42.tar.gz redmine-e680ae1aa31b9a48fb6a94b3a728ff962102bd42.zip |
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
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/base.html.erb | 44 |
1 files changed, 43 insertions, 1 deletions
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 @@ <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <title><%= html_title %></title> +<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="<%= Redmine::Info.app_name %>" /> <meta name="keywords" content="issue,bug,tracker" /> <%= 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 @@ </head> <body class="<%= body_css_classes %>"> <div id="wrapper"> + +<div class="flyout-menu js-flyout-menu"> + + + <% if User.current.logged? || !Setting.login_required? %> + <div class="flyout-menu__search"> + <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> + <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %> + <%= label_tag 'flyout-search', '⚲'.html_safe, :class => 'search-magnifier search-magnifier--flyout' %> + <%= text_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %> + <% end %> + </div> + <% end %> + + <% if User.current.logged? %> + <div class="flyout-menu__avatar <% if !Setting.gravatar_enabled? %>flyout-menu__avatar--no-avatar<% end %>"> + <% if Setting.gravatar_enabled? %> + <%= link_to(avatar(User.current, :size => "80"), user_path(User.current)) %> + <% end %> + <%= link_to_user(User.current, :format => :username) %> + </div> + <% end %> + + <% if display_main_menu?(@project) %> + <h3><%= l(:label_project) %></h3> + <span class="js-project-menu"></span> + <% end %> + + <h3><%= l(:label_general) %></h3> + <span class="js-general-menu"></span> + + <span class="js-sidebar flyout-menu__sidebar"></span> + + <h3><%= l(:label_profile) %></h3> + <span class="js-profile-menu"></span> + +</div> + <div id="wrapper2"> <div id="wrapper3"> <div id="top-menu"> @@ -29,6 +68,9 @@ </div> <div id="header"> + + <a href="#" class="mobile-toggle-button js-flyout-menu-toggle-button"></a> + <% if User.current.logged? || !Setting.login_required? %> <div id="quick-search"> <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> |