Remove bottom padding if no footer in mobile
Add a method in routes Copy mobile routes under the scope 'app' for app usage
This commit is contained in:
1 parent
91d1487a04
commit
4e2cbac027
3 files changed
+28
-19
No files matched your search
@@ -2,6 +2,8 @@ class MobileController < ApplicationController
|
||||
|
||||
layout 'mobile'
|
||||
|
||||
before_filter :no_footer_for_app
|
||||
|
||||
def index
|
||||
date_now = Time.now
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
|
||||
@@ -49,4 +51,10 @@ class MobileController < ApplicationController
|
||||
@page_title = @page_context.page.title
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def no_footer_for_app
|
||||
@no_footer = true if request.path.starts_with?("/app")
|
||||
end
|
||||
|
||||
end
|
||||
@@ -44,7 +44,13 @@
|
||||
|
||||
<!-- iPad icon (Retina) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'mobile/apple-touch-icon-ipad@2x.png' %>">
|
||||
|
||||
<% if @no_footer %>
|
||||
<style type="text/css">
|
||||
.global {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
</head>
|
||||
<body>
|
||||
<div data-role="page" data-url="<%= request.fullpath %>" id="<%= params[:action] %>" data-add-back-btn="<%= params[:action].eql?('index')? nil : 'true' %>">
|
||||
|
||||
Reference in new issue
Block a user