camaleon_cms 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -91
- data/app/apps/plugins/contact_form/contact_form_helper.rb +1 -1
- data/app/assets/images/admin/intro/menus.png +0 -0
- data/app/assets/javascripts/admin/actions.js +17 -0
- data/app/assets/javascripts/admin/admin-manifest.js +2 -0
- data/app/assets/javascripts/admin/introjs/intro.min.js +1316 -0
- data/app/assets/javascripts/admin/post.js +1 -1
- data/app/assets/stylesheets/admin/admin-manifest.css +1 -0
- data/app/assets/stylesheets/admin/custom_admin.css.scss +6 -0
- data/app/assets/stylesheets/admin/introjs/introjs.min.css +1 -0
- data/app/controllers/admin_controller.rb +12 -0
- data/app/decorators/nav_menu_item_decorator.rb +12 -0
- data/app/helpers/admin/menus_helper.rb +19 -18
- data/app/helpers/frontend/nav_menu_helper.rb +10 -1
- data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +0 -3
- data/app/views/layouts/admin.html.erb +1 -1
- data/app/views/layouts/admin/_footer.html.erb +1 -1
- data/app/views/layouts/admin/_header.html.erb +4 -4
- data/app/views/layouts/admin/_sidebar.html.erb +1 -1
- data/config/initializers/assets.rb +3 -2
- data/config/initializers/sass.rb +37 -12
- data/config/locales/admin/en.yml +19 -0
- data/config/locales/admin/es.yml +1 -0
- data/config/locales/admin/it.yml +1 -0
- data/config/routes/admin.rb +1 -0
- data/lib/camaleon_cms/version.rb +1 -1
- metadata +6 -2
@@ -132,7 +132,7 @@ function init_post(obj){
|
|
132
132
|
ar[1] = post_draft_id;
|
133
133
|
$(this).attr('href', ar.join("draft_id="))
|
134
134
|
});
|
135
|
-
$link.find('.btn-edit').click(function(){
|
135
|
+
$link.find('.btn-edit').click(function(){
|
136
136
|
var $btn = $(this);
|
137
137
|
var $btn_edit = $('<a href="#" class="btn btn-default btn-xs btn-edit">'+I18n("button.accept")+'</a> <a href="#" class="btn-cancel">'+I18n("button.cancel")+'</a>');
|
138
138
|
var $label = $link.find('.sl-url');
|
@@ -0,0 +1 @@
|
|
1
|
+
.introjs-overlay{position:absolute;z-index:999999;background-color:#000;opacity:0;background:-moz-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:-webkit-gradient(radial,center center,0px,center center,100%,color-stop(0%,rgba(0,0,0,0.4)),color-stop(100%,rgba(0,0,0,0.9)));background:-webkit-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:-o-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:-ms-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#66000000',endColorstr='#e6000000',GradientType=1);-ms-filter:"alpha(opacity=50)";filter:alpha(opacity=50);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-fixParent{z-index:auto!important;opacity:1.0!important;position:absolute!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important}.introjs-showElement,tr.introjs-showElement>td,tr.introjs-showElement>th{z-index:9999999!important}.introjs-disableInteraction{z-index:99999999!important;position:absolute}.introjs-relativePosition,tr.introjs-showElement>td,tr.introjs-showElement>th{position:relative}.introjs-helperLayer{position:absolute;z-index:9999998;background-color:#FFF;background-color:rgba(255,255,255,.9);border:1px solid #777;border:1px solid rgba(0,0,0,.5);border-radius:4px;box-shadow:0 2px 15px rgba(0,0,0,.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-tooltipReferenceLayer{position:absolute;visibility:hidden;z-index:10000000;background-color:transparent;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperLayer *,.introjs-helperLayer *:before,.introjs-helperLayer *:after{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;-o-box-sizing:content-box;box-sizing:content-box}.introjs-helperNumberLayer{position:absolute;visibility:visible;top:-16px;left:-16px;z-index:9999999999!important;padding:2px;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:bold;color:white;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.3);background:#ff3019;background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff3019),color-stop(100%,#cf0404));background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-ms-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-o-linear-gradient(top,#ff3019 0,#cf0404 100%);background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);width:20px;height:20px;line-height:20px;border:3px solid white;border-radius:50%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019',endColorstr='#cf0404',GradientType=0);filter:progid:DXImageTransform.Microsoft.Shadow(direction=135,strength=2,color=ff0000);box-shadow:0 2px 5px rgba(0,0,0,.4)}.introjs-arrow{border:5px solid white;content:'';position:absolute}.introjs-arrow.top{top:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.top-right{top:-10px;right:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.top-middle{top:-10px;left:50%;margin-left:-5px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.right{right:-10px;top:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.right-bottom{bottom:10px;right:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.bottom{bottom:-10px;border-top-color:white;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left{left:-10px;top:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left-bottom{left:-10px;bottom:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-tooltip{position:absolute;visibility:visible;padding:10px;background-color:white;min-width:250px;max-width:300px;border-radius:3px;box-shadow:0 1px 10px rgba(0,0,0,.4);-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;-ms-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltipbuttons{text-align:right;white-space:nowrap; margin-top: 15px;}.introjs-buttonn{position:relative;overflow:visible;display:inline-block;padding:.3em .8em;border:1px solid #d4d4d4;margin:0;text-decoration:none;text-shadow:1px 1px 0 #fff;font:11px/normal sans-serif;color:#333;white-space:nowrap;cursor:pointer;outline:0;background-color:#ececec;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f4f4),to(#ececec));background-image:-moz-linear-gradient(#f4f4f4,#ececec);background-image:-o-linear-gradient(#f4f4f4,#ececec);background-image:linear-gradient(#f4f4f4,#ececec);-webkit-background-clip:padding;-moz-background-clip:padding;-o-background-clip:padding-box;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;zoom:1;*display:inline;margin-top:10px}.introjs-bullets{text-align:center}.introjs-bullets ul{clear:both;margin:15px auto 0;padding:0;display:inline-block}.introjs-bullets ul li{list-style:none;float:left;margin:0 2px}.introjs-bullets ul li a{display:block;width:6px;height:6px;background:#ccc;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;text-decoration:none}.introjs-bullets ul li a:hover{background:#999}.introjs-bullets ul li a.active{background:#999}.introjs-progress{overflow:hidden;height:10px;margin:10px 0 5px 0;border-radius:4px;background-color:#ecf0f1}.introjs-progressbar{float:left;width:0;height:100%;font-size:10px;line-height:10px;text-align:center;background-color:#08c}.introjsFloatingElement{position:absolute;height:0;width:0;left:50%;top:50%}.introjs-prevbutton{ margin-right: 3px;}
|
@@ -25,6 +25,18 @@ class AdminController < CamaleonController
|
|
25
25
|
def index
|
26
26
|
end
|
27
27
|
|
28
|
+
# ajax requests for admin panel
|
29
|
+
# you need to send a param mode to control the action to to do
|
30
|
+
def ajax
|
31
|
+
case params[:mode]
|
32
|
+
when "save_intro"
|
33
|
+
current_site.set_option("save_intro", true);
|
34
|
+
when "save_intro_post"
|
35
|
+
current_site.set_option("save_intro_post", true);
|
36
|
+
end
|
37
|
+
render inline: ""
|
38
|
+
end
|
39
|
+
|
28
40
|
# render admin dashboard
|
29
41
|
def dashboard
|
30
42
|
render "admin/dashboard/index"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
=begin
|
2
|
+
Camaleon CMS is a content management system
|
3
|
+
Copyright (C) 2015 by Owen Peredo Diaz
|
4
|
+
Email: owenperedo@gmail.com
|
5
|
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
6
|
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
|
+
See the GNU Affero General Public License (GPLv3) for more details.
|
8
|
+
=end
|
9
|
+
class NavMenuItemDecorator < Draper::Decorator
|
10
|
+
include CustomFieldsConcern
|
11
|
+
delegate_all
|
12
|
+
end
|
@@ -25,39 +25,39 @@ module Admin::MenusHelper
|
|
25
25
|
if pt.manage_tags?
|
26
26
|
items_i << {icon: "tags", title: t('admin.post_type.tags'), url: admin_post_type_post_tags_path(pt.id)} if can? :post_tags, pt
|
27
27
|
end
|
28
|
-
items << {icon: "
|
28
|
+
items << {icon: "copy", title: pt.the_title, url: "", items: items_i } if items_i.present? #if can? :posts, pt
|
29
29
|
end
|
30
|
-
admin_menu_add_menu("content", {icon: "
|
30
|
+
admin_menu_add_menu("content", {icon: "database", title: t('admin.sidebar.content'), url: "", items: items, datas: "data-intro='#{t("admin.intro.content")}' data-position='right' data-wait='600'"}) if items.present?
|
31
31
|
#end
|
32
32
|
|
33
|
-
admin_menu_add_menu("media", {icon: "picture-o", title: t('admin.sidebar.media'), url: admin_media_path}) if can? :manager, :media
|
34
|
-
admin_menu_add_menu("comments", {icon: "comments", title: t('admin.sidebar.comments'), url: admin_comments_path}) if can? :manager, :comments
|
33
|
+
admin_menu_add_menu("media", {icon: "picture-o", title: t('admin.sidebar.media'), url: admin_media_path, datas: "data-intro='#{t("admin.intro.media")}' data-position='right'"}) if can? :manager, :media
|
34
|
+
admin_menu_add_menu("comments", {icon: "comments", title: t('admin.sidebar.comments'), url: admin_comments_path, datas: "data-intro='#{t("admin.intro.comments")}' data-position='right'"}) if can? :manager, :comments
|
35
35
|
|
36
36
|
items = []
|
37
|
-
items << {icon: "desktop", title: t('admin.sidebar.themes'), url: admin_appearances_themes_path} if can? :manager, :themes
|
38
|
-
items << {icon: "archive", title: t('admin.sidebar.widgets'), url: admin_appearances_widgets_main_index_path} if can? :manager, :widgets
|
39
|
-
items << {icon: "list", title: t('admin.sidebar.menus'), url: admin_appearances_nav_menus_menu_path} if can? :manager, :nav_menu
|
40
|
-
admin_menu_add_menu("appearance", {icon: "paint-brush", title: t('admin.sidebar.appearance'), url: "", items: items}) if items.present?
|
37
|
+
items << {icon: "desktop", title: t('admin.sidebar.themes'), url: admin_appearances_themes_path, datas: "data-intro='#{t("admin.intro.themes")}' data-position='right'"} if can? :manager, :themes
|
38
|
+
items << {icon: "archive", title: t('admin.sidebar.widgets'), url: admin_appearances_widgets_main_index_path, datas: "data-intro='#{t("admin.intro.widgets")}' data-position='right'"} if can? :manager, :widgets
|
39
|
+
items << {icon: "list", title: t('admin.sidebar.menus'), url: admin_appearances_nav_menus_menu_path, datas: "data-intro='#{t("admin.intro.menus", image: view_context.asset_path("admin/intro/menus.png"))}' data-position='right'"} if can? :manager, :nav_menu
|
40
|
+
admin_menu_add_menu("appearance", {icon: "paint-brush", title: t('admin.sidebar.appearance'), url: "", items: items, datas: "data-intro='#{t("admin.intro.appearance")}' data-position='right' data-wait='500'"}) if items.present?
|
41
41
|
|
42
42
|
|
43
|
-
admin_menu_add_menu("plugins", {icon: "plug", title: "#{t('admin.sidebar.plugins')} <small class='label label-primary'>#{PluginRoutes.all_plugins.size}</small>", url: admin_plugins_path}) if can? :manager, :plugins
|
43
|
+
admin_menu_add_menu("plugins", {icon: "plug", title: "#{t('admin.sidebar.plugins')} <small class='label label-primary'>#{PluginRoutes.all_plugins.size}</small>", url: admin_plugins_path, datas: "data-intro='#{t("admin.intro.plugins")}' data-position='right'"}) if can? :manager, :plugins
|
44
44
|
|
45
45
|
if can? :manager, :users
|
46
46
|
items = []
|
47
47
|
items << {icon: "list", title: t('admin.users.all_users'), url: admin_users_path}
|
48
48
|
items << {icon: "plus", title: t('admin.users.add_user'), url: new_admin_user_path}
|
49
49
|
items << {icon: "group", title: t('admin.users.user_roles'), url: admin_user_roles_path}
|
50
|
-
admin_menu_add_menu("users", {icon: "users", title: t('admin.sidebar.users'), url: "", items: items})
|
50
|
+
admin_menu_add_menu("users", {icon: "users", title: t('admin.sidebar.users'), url: "", items: items, datas: "data-intro='#{t("admin.intro.users")}' data-position='right' data-wait='500'"})
|
51
51
|
end
|
52
52
|
|
53
53
|
if can? :manager, :settings
|
54
54
|
items = []
|
55
|
-
items << {icon: "desktop", title: t('admin.sidebar.general_site'), url: admin_settings_site_path}
|
56
|
-
items << {icon: "cog", title: t('admin.sidebar.sites'), url: admin_settings_sites_path} if current_site.manage_sites?
|
57
|
-
items << {icon: "files-o", title: t('admin.sidebar.
|
58
|
-
items << {icon: "cog", title: t('admin.sidebar.custom_fields'), url: admin_settings_custom_fields_path}
|
59
|
-
items << {icon: "language", title: t('admin.sidebar.languages'), url: admin_settings_languages_path}
|
60
|
-
admin_menu_add_menu("settings", {icon: "cogs", title: t('admin.sidebar.settings'), url: "", items: items})
|
55
|
+
items << {icon: "desktop", title: t('admin.sidebar.general_site'), url: admin_settings_site_path, datas: "data-intro='#{t("admin.intro.gral_site")}' data-position='right'"}
|
56
|
+
items << {icon: "cog", title: t('admin.sidebar.sites'), url: admin_settings_sites_path, datas: "data-intro='#{t("admin.intro.sites")}' data-position='right'"} if current_site.manage_sites?
|
57
|
+
items << {icon: "files-o", title: t('admin.sidebar.content_groups'), url: admin_settings_post_types_path, datas: "data-intro='#{t("admin.intro.post_type")}' data-position='right'"}
|
58
|
+
items << {icon: "cog", title: t('admin.sidebar.custom_fields'), url: admin_settings_custom_fields_path, datas: "data-intro='#{t("admin.intro.custom_fields")}' data-position='right'"}
|
59
|
+
items << {icon: "language", title: t('admin.sidebar.languages'), url: admin_settings_languages_path, datas: "data-intro='#{t("admin.intro.languages")}' data-position='right'"}
|
60
|
+
admin_menu_add_menu("settings", {icon: "cogs", title: t('admin.sidebar.settings'), url: "", items: items, datas: "data-intro='#{t("admin.intro.settings")}' data-position='right' data-wait='500'"})
|
61
61
|
end
|
62
62
|
|
63
63
|
end
|
@@ -69,6 +69,7 @@ module Admin::MenusHelper
|
|
69
69
|
# - title: title for the menu
|
70
70
|
# - url: url for the menu
|
71
71
|
# - items: is an recursive array of the menus without a key
|
72
|
+
# - datas: html data text for this menu item
|
72
73
|
def admin_menu_add_menu(key, menu)
|
73
74
|
@_admin_menus[key] = menu
|
74
75
|
end
|
@@ -119,7 +120,7 @@ module Admin::MenusHelper
|
|
119
120
|
@_tmp_menu_parents = []
|
120
121
|
menus = _get_url_current
|
121
122
|
menus.each do |menu|
|
122
|
-
res << "<li data-key='#{menu[:key]}' class='#{"treeview" if menu.has_key?(:items)} #{'active' if is_active_menu(menu[:key])}'>
|
123
|
+
res << "<li data-key='#{menu[:key]}' class='#{"treeview" if menu.has_key?(:items)} #{'active' if is_active_menu(menu[:key])}' #{menu[:datas]}>
|
123
124
|
<a href='#{menu[:url]}'><i class='fa fa-#{menu[:icon]}'></i> <span class=''>#{menu[:title]}</span> #{'<i class="fa fa-angle-left pull-right"></i>' if menu.has_key?(:items) }</a>
|
124
125
|
#{_admin_menu_draw(menu[:items]) if menu.has_key?(:items)}
|
125
126
|
</li>"
|
@@ -177,7 +178,7 @@ module Admin::MenusHelper
|
|
177
178
|
res = []
|
178
179
|
res << "<ul class='treeview-menu'>"
|
179
180
|
items.each do |item|
|
180
|
-
res << "<li class='#{"xn-openable" if item.has_key?(:items)} #{'active' if is_active_menu(item[:key])}'>
|
181
|
+
res << "<li class='#{"xn-openable" if item.has_key?(:items)} #{'active' if is_active_menu(item[:key])}' #{item[:datas]}>
|
181
182
|
<a href='#{item[:url]}'><i class='fa fa-#{item[:icon]}'></i> #{item[:title]} #{'<i class="fa fa-angle-left pull-right"></i>' if item.has_key?(:items) }</a>
|
182
183
|
#{_admin_menu_draw(item[:items]) if item.has_key?(:items)}
|
183
184
|
</li>"
|
@@ -89,7 +89,16 @@ module Frontend::NavMenuHelper
|
|
89
89
|
next if data_nav_item == false
|
90
90
|
_is_current = site_current_path == data_nav_item[:link] || site_current_path == data_nav_item[:link].sub(".html", "")
|
91
91
|
has_children = nav_menu_item.have_children? && (args[:levels] == -1 || (args[:levels] != -1 && level <= args[:levels]))
|
92
|
-
r = {
|
92
|
+
r = {
|
93
|
+
menu_item: nav_menu_item.decorate,
|
94
|
+
link: data_nav_item,
|
95
|
+
level: level,
|
96
|
+
settings: _args,
|
97
|
+
has_children: has_children,
|
98
|
+
link_attrs: '',
|
99
|
+
index: index
|
100
|
+
}
|
101
|
+
args[:callback_item].call(r)
|
93
102
|
_args = r[:settings]
|
94
103
|
|
95
104
|
if has_children
|
@@ -18,9 +18,6 @@
|
|
18
18
|
<div class="dd" id="nestable">
|
19
19
|
<ol class="dd-list"></ol>
|
20
20
|
</div>
|
21
|
-
</div>
|
22
|
-
<div class="panel-body">
|
23
|
-
|
24
21
|
</div>
|
25
22
|
<div class="panel-footer">
|
26
23
|
<%= content_tag(:div, (raw @nav_menu.description), class: "callout callout-info") if @nav_menu.description.present? %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
33
33
|
<![endif]-->
|
34
34
|
</head>
|
35
|
-
<body class="hold-transition skin-blue sidebar-mini">
|
35
|
+
<body class="hold-transition skin-blue sidebar-mini" data-intro="<%= current_site.get_option("save_intro") %>">
|
36
36
|
<%= raw content_before_draw %>
|
37
37
|
<div class="wrapper">
|
38
38
|
|
@@ -2,5 +2,5 @@
|
|
2
2
|
<div class="pull-right hidden-xs">
|
3
3
|
<b>Version</b><%= CamaleonCms::VERSION %>
|
4
4
|
</div>
|
5
|
-
<strong>Copyright © 2015-2016 <a href="http://camaleon.tuzitio.com">Camaleon CMS.</a> </strong
|
5
|
+
<strong>Copyright © 2015-2016 <a href="http://camaleon.tuzitio.com">Camaleon CMS.</a> </strong>.
|
6
6
|
</footer>
|
@@ -16,10 +16,12 @@
|
|
16
16
|
<div class="navbar-custom-menu">
|
17
17
|
<ul class="nav navbar-nav">
|
18
18
|
<%= r = {html: ""}; hooks_run("admin_notifications", r); raw(r[:html]); %>
|
19
|
+
<li><a target="_blank" href="<%= current_site.the_url %>"><i class="fa fa-eye"></i> <%= t("common.visit") %></a></li>
|
19
20
|
<li class="dropdown user user-menu">
|
20
|
-
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
21
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-intro='<%= t("admin.intro.profile") %>' data-position='left'>
|
21
22
|
<img src="<%= current_user.the_avatar %>" class="user-image" alt="User Image">
|
22
23
|
<span class="hidden-xs"><%= current_user.fullname %></span>
|
24
|
+
<span class="caret"></span>
|
23
25
|
</a>
|
24
26
|
<ul class="dropdown-menu">
|
25
27
|
<!-- User image -->
|
@@ -42,9 +44,7 @@
|
|
42
44
|
</ul>
|
43
45
|
</li>
|
44
46
|
<!-- Control Sidebar Toggle Button -->
|
45
|
-
<li class="hidden">
|
46
|
-
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
47
|
-
</li>
|
47
|
+
<li class="hidden"><a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a></li>
|
48
48
|
</ul>
|
49
49
|
</div>
|
50
50
|
</nav>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<!-- sidebar: style can be found in sidebar.less -->
|
3
3
|
<section class="sidebar">
|
4
4
|
<!-- search form -->
|
5
|
-
<form action="#" method="get" class="sidebar-form">
|
5
|
+
<form action="#" method="get" class="sidebar-form hidden">
|
6
6
|
<div class="input-group">
|
7
7
|
<input type="text" name="q" class="form-control" placeholder="Search...">
|
8
8
|
<span class="input-group-btn">
|
@@ -34,9 +34,10 @@ Rails.application.config.assets.version = '1.0'
|
|
34
34
|
# This will precompile any assets, not just JavaScript (.js, .coffee, .swf, .css, .scss)
|
35
35
|
# Rails.application.config.assets.precompile << /(^[^_\/]|\/[^_])[^\/]*$/
|
36
36
|
Rails.application.config.assets.precompile << Proc.new { |path|
|
37
|
-
|
37
|
+
name = File.basename(path)
|
38
|
+
content_type = MIME::Types.type_for(name).first.content_type rescue ""
|
38
39
|
res = false
|
39
|
-
if (path =~ /\.(css|js|svg|ttf|woff|eot|swf|pdf)\z/ || content_type.scan(/(javascript|image\/|audio|video|font)/).any?) && !
|
40
|
+
if (path =~ /\.(css|js|svg|ttf|woff|eot|swf|pdf)\z/ || content_type.scan(/(javascript|image\/|audio|video|font)/).any?) && !name.start_with?("_")
|
40
41
|
res = true
|
41
42
|
end
|
42
43
|
res
|
data/config/initializers/sass.rb
CHANGED
@@ -71,18 +71,43 @@ module Sprockets
|
|
71
71
|
class SassProcessor
|
72
72
|
module Functions
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
74
|
+
# return them path (this prefix automatically the path with current theme location)
|
75
|
+
# Sample: .container{ background: #ffffff url(asset_theme_path('img/patterns/pattern1.jpg')); }
|
76
|
+
def asset_theme_path(path, options = {})
|
77
|
+
asset_path(Autoload::Sass::Script::String.new("#{get_theme_prefix}/#{path.value}"), options)
|
78
|
+
end
|
79
|
+
|
80
|
+
# return them path (this prefix automatically the path with current theme location)
|
81
|
+
def asset_plugin_path(path, options = {})
|
82
|
+
asset_path(Autoload::Sass::Script::String.new("#{get_plugin_prefix}/#{path.value}"), options)
|
83
|
+
end
|
84
|
+
|
85
|
+
# return them path (this prefix automatically the path with current theme location)
|
86
|
+
# Sample: .container{ background: #ffffff asset-theme-url('img/patterns/pattern1.jpg'); }
|
87
|
+
def asset_theme_url(path, options = {})
|
88
|
+
asset_url(Autoload::Sass::Script::String.new("#{get_theme_prefix}/#{path.value}"), options)
|
89
|
+
end
|
90
|
+
|
91
|
+
# return them path (this prefix automatically the path with current theme location)
|
92
|
+
def asset_plugin_url(path, options = {})
|
93
|
+
asset_url(Autoload::Sass::Script::String.new("#{get_plugin_prefix}/#{path.value}"), options)
|
94
|
+
end
|
95
|
+
|
96
|
+
private
|
97
|
+
# get plugin asset prefix
|
98
|
+
def get_plugin_prefix
|
99
|
+
file = self.options[:filename]
|
100
|
+
res = ""
|
101
|
+
res = "plugins/#{file.split("/plugins/").last.split("/").first}/#{"assets/" if file.include?("apps/plugins/")}" if file.include?("/plugins/")
|
102
|
+
res
|
103
|
+
end
|
104
|
+
|
105
|
+
# get theme asset prefix
|
106
|
+
def get_theme_prefix
|
107
|
+
file = self.options[:filename]
|
108
|
+
res = ""
|
109
|
+
res = "themes/#{file.split("/themes/").last.split("/").first}/#{"assets/" if file.include?("apps/themes/")}" if file.include?("/themes/")
|
110
|
+
res
|
86
111
|
end
|
87
112
|
end
|
88
113
|
end
|
data/config/locales/admin/en.yml
CHANGED
@@ -349,6 +349,7 @@ en:
|
|
349
349
|
appearance: 'Appearance'
|
350
350
|
comments: 'Comments'
|
351
351
|
content: 'Content'
|
352
|
+
content_groups: 'Content Groups'
|
352
353
|
custom_fields: 'Custom Fields'
|
353
354
|
dashboard: 'Dashboard'
|
354
355
|
general_site: 'General Site'
|
@@ -584,3 +585,21 @@ en:
|
|
584
585
|
error_created: 'Not Created Widget.'
|
585
586
|
error_updated: 'Not Updated Widget.'
|
586
587
|
not_registered_widgets: 'There are no registered widgets'
|
588
|
+
intro:
|
589
|
+
profile: "In this place you can see your profile options."
|
590
|
+
content: "This block contains all content groups of your site. Each content can have different structure configured in settings => Post Type"
|
591
|
+
#dashboard: "In this section you can see "
|
592
|
+
media: "This section manage your all your public media files"
|
593
|
+
comments: "This section manage all the comments of your contents"
|
594
|
+
appearance: "Manage all the information related to Public Interface"
|
595
|
+
themes: "In this section you can choose your preferred theme (Public Interface)"
|
596
|
+
widgets: "This module permit you to manage your widgets and paste the code in any content."
|
597
|
+
menus: "<img style=\"max-width: 100%;\" src=\"%{image}\" /> This module permit you to control your menus for Public Interface in multiple levels."
|
598
|
+
plugins: "In this section you can see all plugins (custom applications to extend your site functionality)."
|
599
|
+
users: "Permit you to manage all users of the site. Also you can manage the roles for the users."
|
600
|
+
settings: "In this section you can find all site configurations"
|
601
|
+
gral_site: "This is a section where you can configure all settings of the site and current theme"
|
602
|
+
sites: "This module permit you to manage your sub sites, i.e. you can create unlimited sites like this (This is visible only for main site). Check /config/system.json to customize settings."
|
603
|
+
custom_fields: "This section permit you to extend easily your contents, themes,... by custom fields."
|
604
|
+
post_type: "In this module you can manage your content groups without programing anything."
|
605
|
+
languages: "This module permit you to manage all languages for your site. Also you can configure the language for your admin panel."
|
data/config/locales/admin/es.yml
CHANGED
data/config/locales/admin/it.yml
CHANGED
data/config/routes/admin.rb
CHANGED
data/lib/camaleon_cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camaleon_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen Peredo Diaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack-page_caching
|
@@ -353,6 +353,7 @@ files:
|
|
353
353
|
- app/assets/fonts/glyphicons-halflings-regular.ttf
|
354
354
|
- app/assets/fonts/glyphicons-halflings-regular.woff
|
355
355
|
- app/assets/images/admin/glyphicons-halflings.png
|
356
|
+
- app/assets/images/admin/intro/menus.png
|
356
357
|
- app/assets/images/admin/no_image.jpg
|
357
358
|
- app/assets/images/bg-tree.jpeg
|
358
359
|
- app/assets/images/camaleon-dark.png
|
@@ -391,6 +392,7 @@ files:
|
|
391
392
|
- app/assets/javascripts/admin/form/jquery.form.js
|
392
393
|
- app/assets/javascripts/admin/grid-editor.js
|
393
394
|
- app/assets/javascripts/admin/i18n.js
|
395
|
+
- app/assets/javascripts/admin/introjs/intro.min.js
|
394
396
|
- app/assets/javascripts/admin/it.js
|
395
397
|
- app/assets/javascripts/admin/jquery-sieve.js
|
396
398
|
- app/assets/javascripts/admin/jquery-ui.min.js
|
@@ -494,6 +496,7 @@ files:
|
|
494
496
|
- app/assets/stylesheets/admin/img/no_image.jpg
|
495
497
|
- app/assets/stylesheets/admin/img/rormeleon-white.png
|
496
498
|
- app/assets/stylesheets/admin/img/thumb_no_found.jpg
|
499
|
+
- app/assets/stylesheets/admin/introjs/introjs.min.css
|
497
500
|
- app/assets/stylesheets/admin/jquery.tagsinput.css
|
498
501
|
- app/assets/stylesheets/admin/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png
|
499
502
|
- app/assets/stylesheets/admin/jquery/images/ui-bg_flat_75_ffffff_40x100.png
|
@@ -589,6 +592,7 @@ files:
|
|
589
592
|
- app/decorators/custom_field_decorator.rb
|
590
593
|
- app/decorators/custom_fields_concern.rb
|
591
594
|
- app/decorators/metas_decorator_methods.rb
|
595
|
+
- app/decorators/nav_menu_item_decorator.rb
|
592
596
|
- app/decorators/post_comment_decorator.rb
|
593
597
|
- app/decorators/post_decorator.rb
|
594
598
|
- app/decorators/post_tag_decorator.rb
|