roroacms 0.0.6.2 → 0.0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/roroacms/admin/roroafull.png +0 -0
- data/app/assets/stylesheets/roroacms/admin/{main.css.erb → main.css.scss} +5 -5
- data/app/controllers/roroacms/application_controller.rb +8 -0
- data/app/controllers/roroacms/pages_controller.rb +4 -0
- data/app/controllers/roroacms/setup_controller.rb +18 -6
- data/app/helpers/roroacms/admin_roroa_helper.rb +4 -0
- data/app/helpers/roroacms/admin_view_helper.rb +8 -0
- data/app/views/layouts/roroacms/admin.html.erb +0 -1
- data/lib/roroacms/engine.rb +3 -3
- metadata +35 -3
Binary file
|
@@ -66,7 +66,7 @@ h3.underline {
|
|
66
66
|
min-height: 80px;
|
67
67
|
padding: 0 0 0 10px;
|
68
68
|
position: relative;
|
69
|
-
background: #5ce0aa url(
|
69
|
+
background: #5ce0aa url(roroafull.png) no-repeat center center;
|
70
70
|
}
|
71
71
|
#header {
|
72
72
|
z-index: 200;
|
@@ -85,7 +85,7 @@ h3.underline {
|
|
85
85
|
min-height: 80px;
|
86
86
|
padding: 0 0 0 10px;
|
87
87
|
position: relative;
|
88
|
-
background: #5ce0aa url(
|
88
|
+
background: #5ce0aa url(roroafull.png) no-repeat center center;
|
89
89
|
}
|
90
90
|
#header .logo {
|
91
91
|
color: #fff;
|
@@ -2199,7 +2199,7 @@ section#login-container div#error_explanation ul li {
|
|
2199
2199
|
display: inline-block;
|
2200
2200
|
}
|
2201
2201
|
#login-wrapper .logo:before {
|
2202
|
-
background-image: url(
|
2202
|
+
background-image: url(logo.png);
|
2203
2203
|
background-position: left center;
|
2204
2204
|
background-repeat: no-repeat;
|
2205
2205
|
padding: 0 20px;
|
@@ -2723,8 +2723,8 @@ h3.timeline-title {
|
|
2723
2723
|
margin-bottom: 10px;
|
2724
2724
|
}
|
2725
2725
|
.radio-inline:first-child {
|
2726
|
-
|
2727
|
-
padding-left: 0px
|
2726
|
+
margin-left: 0px;
|
2727
|
+
padding-left: 0px;
|
2728
2728
|
}
|
2729
2729
|
select.form-control {
|
2730
2730
|
margin-bottom: 10px;
|
@@ -111,19 +111,27 @@ module Roroacms
|
|
111
111
|
|
112
112
|
end
|
113
113
|
|
114
|
+
# check that the setup is complete if not redirect to the setup area
|
115
|
+
|
114
116
|
def check_setup
|
115
117
|
redirect_to setup_index_path and return if Setting.get('setup_complete') != 'Y' && params[:controller] != 'roroacms/setup'
|
116
118
|
end
|
117
119
|
|
120
|
+
# add the home breadcrumb for the front end
|
121
|
+
|
118
122
|
def add_breadcrumb_fe
|
119
123
|
add_breadcrumb I18n.t("generic.home"), '/', :title => I18n.t("generic.home") if !params[:controller].include?('admin/')
|
120
124
|
end
|
121
125
|
|
126
|
+
# add a breadcrumb to the breadcrumb hash
|
127
|
+
|
122
128
|
def add_breadcrumb(name, url = 'javascript:;', atts = {})
|
123
129
|
hash = { name: name, url: url, atts: atts }
|
124
130
|
@breadcrumbs << hash
|
125
131
|
end
|
126
132
|
|
133
|
+
# restricts any CRUD functions if you are logged in as the username of demo and you have demonstration mode turned on
|
134
|
+
|
127
135
|
def authorize_demo
|
128
136
|
if !request.xhr? && !request.get? && ( !current_user.blank? && current_user.username.downcase == 'demo' && Setting.get('demonstration_mode') == 'Y' )
|
129
137
|
redirect_to :back, flash: { error: I18n.t('generic.demo_notification') } and return
|
@@ -29,6 +29,7 @@ module Roroacms
|
|
29
29
|
route_index_page params
|
30
30
|
end
|
31
31
|
|
32
|
+
# Shows the page via the ID, simlply pass in the ID of the page that you would like to view via params
|
32
33
|
|
33
34
|
def show
|
34
35
|
redirect_to show_url(params)
|
@@ -42,6 +43,9 @@ module Roroacms
|
|
42
43
|
route_dynamic_page params
|
43
44
|
end
|
44
45
|
|
46
|
+
|
47
|
+
# Check to see if there is a theme installed and if so has it got all the necessary files
|
48
|
+
|
45
49
|
def check_theme_folder_new
|
46
50
|
@meta_translation = I18n.t("views.admin.layouts.admin.meta_title_theme_issues")
|
47
51
|
@missing = check_necessaries
|
@@ -8,6 +8,8 @@ module Roroacms
|
|
8
8
|
helper Roroacms::AdminRoroaHelper
|
9
9
|
include Roroacms::AdminRoroaHelper
|
10
10
|
|
11
|
+
# Show setup page
|
12
|
+
|
11
13
|
def index
|
12
14
|
Setting.reload_settings
|
13
15
|
@settings = Setting.get_all
|
@@ -15,6 +17,8 @@ module Roroacms
|
|
15
17
|
@title = I18n.t("generic.installation.one")
|
16
18
|
end
|
17
19
|
|
20
|
+
# Create the settings for the Admin panel to work!
|
21
|
+
|
18
22
|
def create
|
19
23
|
# To do update this table we loop through the fields and update the key with the value.
|
20
24
|
# In order to do this we need to remove any unnecessary keys from the params hash
|
@@ -41,6 +45,8 @@ module Roroacms
|
|
41
45
|
|
42
46
|
end
|
43
47
|
|
48
|
+
# create a new admin user
|
49
|
+
|
44
50
|
def create_user
|
45
51
|
@admin = Admin.new(administrator_params)
|
46
52
|
@admin.access_level = 'admin'
|
@@ -58,23 +64,22 @@ module Roroacms
|
|
58
64
|
|
59
65
|
end
|
60
66
|
|
67
|
+
# create a new admin object
|
68
|
+
|
61
69
|
def administrator
|
62
70
|
@title = I18n.t("generic.installation.two")
|
63
71
|
@admin = Admin.new
|
64
72
|
end
|
65
73
|
|
66
|
-
|
67
|
-
params.delete :utf8
|
68
|
-
params.delete :authenticity_token
|
69
|
-
params.delete :commit
|
70
|
-
params.delete :redirect
|
71
|
-
end
|
74
|
+
# Check to see if the setup has been completed, if it has then show 404 page
|
72
75
|
|
73
76
|
def check_setup
|
74
77
|
@meta_translation = I18n.t("views.admin.layouts.admin.meta_title_installation")
|
75
78
|
render_404 if Setting.get('setup_complete') == 'Y' && params[:action] != 'tour_complete'
|
76
79
|
end
|
77
80
|
|
81
|
+
# complete the tour of the administration panel
|
82
|
+
|
78
83
|
def tour_complete
|
79
84
|
Setting.save_data({tour_taken: 'Y'})
|
80
85
|
render :inline => 'complete'
|
@@ -88,6 +93,13 @@ module Roroacms
|
|
88
93
|
params.require(:admin).permit(:email, :username, :password, :password_confirmation)
|
89
94
|
end
|
90
95
|
|
96
|
+
def remove_unwanted_keys
|
97
|
+
params.delete :utf8
|
98
|
+
params.delete :authenticity_token
|
99
|
+
params.delete :commit
|
100
|
+
params.delete :redirect
|
101
|
+
end
|
102
|
+
|
91
103
|
end
|
92
104
|
|
93
105
|
end
|
@@ -363,6 +363,8 @@ module Roroacms
|
|
363
363
|
end
|
364
364
|
end
|
365
365
|
|
366
|
+
# appends any extra menu items that are set in the applications configurations
|
367
|
+
|
366
368
|
def append_application_menu
|
367
369
|
html = ''
|
368
370
|
Roroacms.append_menu.each do |f|
|
@@ -371,6 +373,8 @@ module Roroacms
|
|
371
373
|
html.html_safe
|
372
374
|
end
|
373
375
|
|
376
|
+
# checks to see if the stylesheets/javascript override files exist in the application
|
377
|
+
|
374
378
|
def application_admin_file_exists?(file, ext)
|
375
379
|
folder = ext == 'js' ? 'javascripts' : 'stylesheets'
|
376
380
|
script = "#{Rails.root}/app/assets/#{folder}/roroacms/#{file}.#{ext}"
|
@@ -1,14 +1,22 @@
|
|
1
1
|
module Roroacms
|
2
2
|
module AdminViewHelper
|
3
3
|
|
4
|
+
# There functions are used to recreate the views in the main application.
|
5
|
+
|
6
|
+
# renders the table header file
|
7
|
+
|
4
8
|
def obtain_admin_table_header(variables)
|
5
9
|
render partial: 'roroacms/admin/partials/table_header', locals: variables
|
6
10
|
end
|
7
11
|
|
12
|
+
# renders the submit bar header file
|
13
|
+
|
8
14
|
def obtain_admin_submit_bar
|
9
15
|
render :partial => 'roroacms/admin/partials/submit_bar'
|
10
16
|
end
|
11
17
|
|
18
|
+
# renders the table editor file
|
19
|
+
|
12
20
|
def obtain_admin_editor(variables)
|
13
21
|
render :partial => 'roroacms/admin/partials/editor', locals: variables
|
14
22
|
end
|
data/lib/roroacms/engine.rb
CHANGED
@@ -25,6 +25,7 @@ module Roroacms
|
|
25
25
|
isolate_namespace Roroacms
|
26
26
|
|
27
27
|
DB = YAML.load_file(Dir.pwd + "/config/database.yml")
|
28
|
+
|
28
29
|
require 'active_record'
|
29
30
|
|
30
31
|
ActiveRecord::Base.establish_connection(
|
@@ -59,14 +60,13 @@ module Roroacms
|
|
59
60
|
Rails.application.config.assets.precompile += %w( roroacms/roroacms.js ) if File.exists?("#{Dir.pwd}/app/assets/javascripts/roroacms/roroacms.js")
|
60
61
|
Rails.application.config.assets.precompile += %w( roroacms/roroacms.css ) if File.exists?("#{Dir.pwd}/app/assets/stylesheets/roroacms/roroacms.css")
|
61
62
|
Rails.application.config.assets.precompile += ["theme.css", "theme.js", "theme.scss", "theme.coffee"]
|
62
|
-
Rails.application.config.assets.precompile += ["#{Dir.pwd}/app/views/themes/#{Setting.get('theme_folder')}/assets
|
63
|
-
|
63
|
+
Rails.application.config.assets.precompile += ["#{Dir.pwd}/app/views/themes/#{Setting.get('theme_folder')}/assets/*"]
|
64
|
+
|
64
65
|
end
|
65
66
|
|
66
67
|
config.assets.precompile += %w( *.js *.css )
|
67
68
|
config.serve_static_assets = true
|
68
69
|
|
69
|
-
|
70
70
|
config.i18n.default_locale = :en
|
71
71
|
config.assets.initialize_on_precompile = true
|
72
72
|
config.assets.enabled = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roroacms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.6.
|
4
|
+
version: 0.0.6.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -43,6 +43,38 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: sass-rails
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 4.0.3
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 4.0.3
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: coffee-rails
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 4.0.0
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 4.0.0
|
46
78
|
- !ruby/object:Gem::Dependency
|
47
79
|
name: kaminari
|
48
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,7 +356,7 @@ files:
|
|
324
356
|
- app/assets/javascripts/roroacms/vendor/select.js
|
325
357
|
- app/assets/javascripts/roroacms/vendor/sortable.js
|
326
358
|
- app/assets/stylesheets/roroacms/admin/application.css
|
327
|
-
- app/assets/stylesheets/roroacms/admin/main.css.
|
359
|
+
- app/assets/stylesheets/roroacms/admin/main.css.scss
|
328
360
|
- app/assets/stylesheets/roroacms/vendor/animate.css
|
329
361
|
- app/assets/stylesheets/roroacms/vendor/bootstrap/css/bootstrap.min.css
|
330
362
|
- app/assets/stylesheets/roroacms/vendor/chosen/chosen.css.erb
|