Removed iframe layout, which was not necessary

This commit is contained in:
echarp 2016-04-17 15:34:04 +02:00
parent 4ea4a4ceb7
commit 0a57efcbc9
5 changed files with 8 additions and 28 deletions

View File

@ -24,8 +24,11 @@ html
margin: 0
padding: 0
background-color: transparent
& > header, & > footer,
h2, nav, .region_selector, .orga_search, .formats, #banner
display: none
ul
margin: 0
body
border: 1px solid #68A6E5

View File

@ -13,7 +13,7 @@ class EventsController < ApplicationController
def index
respond_to do |format|
format.html { render layout: 'iframe' if params[:iframe] }
format.html
format.json { @events = @events.future }
format.rss { @events = @events.future.order('id desc').limit 20 }
format.ics { @events = @events.last_year }

View File

@ -9,7 +9,7 @@ class MapsController < ApplicationController
def index
respond_to do |format|
format.html { render layout: 'iframe' if params[:iframe] }
format.html
format.json { render json: apply_scopes(Event.moderated.geo) }
end
end
@ -17,9 +17,9 @@ class MapsController < ApplicationController
def show
@kind = Kind.find_by_name params[:id]
respond_to do |format|
format.html { render layout: 'iframe' if params[:iframe] }
format.html
format.json do
render json: apply_scopes(Orga.moderated.geo).where(kind: @kind)
render json: apply_scopes(Orga.moderated.active.geo).where(kind: @kind)
end
end
end

View File

@ -1,6 +1,6 @@
!!! 5
/[if IE]
%html.no-js{ lang: I18n.locale }
%html.no-js{ lang: I18n.locale, class: params[:iframe] ? 'iframe' : '' }
%head
%meta(charset='utf-8')
%meta(name='viewport' content='width=device-width, initial-scale=1.0')

View File

@ -1,23 +0,0 @@
!!! 5
/[if IE]
%html.iframe.no-js(lang="#{I18n.locale}")
%head
= display_meta_tags site: t('.title')
%meta(http-equiv='Content-Type' content='text/html; charset=utf-8')
%meta(name='viewport' content='width=device-width, initial-scale=1.0')
%meta(name='robots' content='index, follow')
= favicon_link_tag '/favicon.ico'
= auto_discovery_link_tag :rss, { controller: '/events', format: :rss }
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body(class="#{controller.controller_name} #{controller.action_name}")
= render 'layouts/flash', flash: flash if flash.present?
%main= yield
%em#loading.fa.fa-spin.fa-circle-o-notch