Skip to content

Commit 6babcef

Browse files
author
ismail Akbudak
committed
fix layout error
1 parent c4536a9 commit 6babcef

File tree

8 files changed

+100
-5
lines changed

8 files changed

+100
-5
lines changed

lib/cybele/app_builder.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ def setup_namespaces
297297
copy_file 'app/controllers/hq/sessions_controller.rb', 'app/controllers/hq/sessions_controller.rb'
298298
directory 'app/views/hq/sessions', 'app/views/hq/sessions'
299299

300+
remove_file 'app/views/layouts/hq/application.html.haml'
301+
template 'app/views/layouts/hq/application.html.haml.erb', 'app/views/layouts/hq/application.html.haml', force: true
302+
303+
remove_file 'app/views/layouts/hq/login.html.haml'
304+
template 'app/views/layouts/hq/login.html.haml.erb', 'app/views/layouts/hq/login.html.haml', force: true
305+
300306
# User
301307
copy_file 'app/controllers/user/user_application_controller.rb', 'app/controllers/user/user_application_controller.rb'
302308

templates/app/controllers/user/passwords_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class User::PasswordsController < Devise::PasswordsController
2-
layout 'user/login'
2+
# layout 'user/login'
33

44
private
55

templates/app/controllers/user/profiles_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def profile_params
2828
.permit(
2929
:name,
3030
:surname,
31-
:timezone
31+
:time_zone
3232
)
3333
end
3434
end

templates/app/controllers/user/registrations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class User::RegistrationsController < Devise::RegistrationsController
2-
layout 'user/application'
2+
# layout 'user/application'
33
before_action :authenticate_user!
44
before_action :redirect_user, only: [:new, :create, :destroy]
55
add_breadcrumb I18n.t('activerecord.models.user'), :user_root_path

templates/app/controllers/user/sessions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class User::SessionsController < Devise::SessionsController
2-
layout 'user/login'
2+
# layout 'user/login'
33

44
private
55

templates/app/controllers/user/user_application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'application_responder'
22

33
class User::UserApplicationController < ActionController::Base
4-
layout 'user/application'
4+
# layout 'user/application'
55
before_action :authenticate_user!
66
self.responder = ApplicationResponder
77
respond_to :html, :json
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
!!! 5
2+
/[if IE 8] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
3+
/[if IE 9] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
4+
/[if lt IE 10] <html class="no-js lt-ie10" lang="en-us">
5+
%html{lang: 'en', class: 'no-js'}
6+
%head
7+
%title= content_for?(:title) ? "#{yield(:title)} - <%= app_name %>" : '<%= app_name %>'
8+
%meta(http-equiv="content-type" content="text/html" charset="utf-8")
9+
%meta(http-equiv="x-ua-compatible" content="ie=edge,chrome=1")
10+
%meta(name="description" content="<%= app_name %>")
11+
%meta(name="author" content="<%= app_name %>")
12+
%meta{content: 'initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width', name: 'viewport'}
13+
%meta(name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)")
14+
%meta(name='apple-mobile-web-app-capable' content='yes')
15+
%meta(name='apple-mobile-web-app-status-bar-style' content='translucent-black')
16+
17+
%link(rel="shortcut icon" href="/images/favicon.png")
18+
19+
= csrf_meta_tags
20+
21+
/ Stylesheets (Don't change include order)
22+
= stylesheet_link_tag 'hq/application',
23+
'//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css',
24+
'//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css',
25+
media: 'all', 'data-turbolinks-track' => true
26+
27+
/ Javascripts
28+
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js',
29+
'hq/application', 'data-turbolinks-track' => true
30+
= yield :head
31+
32+
%body.main
33+
34+
/ Navbar
35+
= render partial: 'layouts/hq/partials/navbar'
36+
37+
#wrapper
38+
39+
/ Sidebar
40+
%section#sidebar
41+
= render partial: 'layouts/hq/partials/dock'
42+
43+
/ Tools
44+
%section#tools
45+
= render partial: 'layouts/hq/partials/breadcrumb'
46+
= render partial: 'layouts/hq/partials/toolbar'
47+
48+
/ Content
49+
#content
50+
= render 'layouts/partials/warnings'
51+
= render partial: 'layouts/partials/messages'
52+
= yield
53+
54+
/ Footer
55+
= render partial: 'layouts/hq/partials/footer'
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
!!! 5
2+
/[if IE 8] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
3+
/[if IE 9] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
4+
/[if lt IE 10] <html class="no-js lt-ie10" lang="en-us">
5+
%html{lang: 'en', class: 'no-js'}
6+
%head
7+
%title= yield :title
8+
%meta(http-equiv="content-type" content="text/html" charset="utf-8")
9+
%meta(http-equiv="x-ua-compatible" content="ie=edge,chrome=1")
10+
%meta(name="description" content="")
11+
%meta(name="author" content="")
12+
%meta{content: 'initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width', name: 'viewport'}
13+
%meta(name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)")
14+
%meta(name='apple-mobile-web-app-capable' content='yes')
15+
%meta(name='apple-mobile-web-app-status-bar-style' content='translucent-black')
16+
17+
%link(rel="shortcut icon" href="/images/favicon.png")
18+
19+
/ Stylesheets (Don't change include order)
20+
= stylesheet_link_tag 'hq/application',
21+
'//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css',
22+
media: 'all', 'data-turbolinks-track' => true
23+
= yield :head
24+
25+
%body.login
26+
= render 'layouts/partials/warnings'
27+
.wrapper
28+
= render partial: 'layouts/partials/messages'
29+
= yield
30+
31+
%br/
32+
.text-center.text-muted
33+
= render partial: 'layouts/hq/partials/footer'
34+
= render file: 'public/VERSION.txt'

0 commit comments

Comments
 (0)