camaleon_cms 0.2.1 → 1.0
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 +266 -0
- data/app/apps/plugins/attack/config/config.json +1 -1
- data/app/apps/plugins/contact_form/config/config.json +1 -1
- data/app/apps/plugins/contact_form/contact_form_html_helper.rb +15 -10
- data/app/apps/plugins/contact_form/front_controller.rb +1 -0
- data/app/apps/plugins/contact_form/views/admin_forms/edit.html.erb +1 -2
- data/app/apps/plugins/contact_form/views/admin_forms/index.html.erb +1 -1
- data/app/apps/plugins/contact_form/views/admin_forms/responses.html.erb +1 -1
- data/app/apps/plugins/contact_form/views/forms_shorcode.html.erb +6 -6
- data/app/apps/plugins/front_cache/config/config.json +1 -1
- data/app/apps/plugins/front_cache/views/admin/settings.html.erb +1 -1
- data/app/apps/plugins/visibility_post/config/config.json +1 -1
- data/app/apps/themes/camaleon_first/assets/css/style-ver.css.scss +59 -32
- data/app/apps/themes/camaleon_first/views/layouts/index.html.erb +2 -2
- data/app/apps/themes/default/assets/css/style.css.scss +3 -0
- data/app/apps/themes/default/views/category.html.erb +1 -1
- data/app/apps/themes/default/views/post_tag.html.erb +1 -1
- data/app/apps/themes/default/views/post_type.html.erb +1 -1
- data/app/apps/themes/default/views/search.html.erb +1 -1
- data/app/apps/themes/new/views/category.html.erb +1 -1
- data/app/apps/themes/new/views/layouts/index.html.erb +2 -2
- data/app/apps/themes/new/views/post_tag.html.erb +1 -1
- data/app/apps/themes/new/views/post_type.html.erb +1 -1
- data/app/apps/themes/new/views/search.html.erb +1 -1
- data/app/assets/{stylesheets/admin/bootstrap/images → images/admin}/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/admin/actions.js +12 -205
- data/app/assets/javascripts/admin/admin-basic-manifest.js +3 -0
- data/app/assets/javascripts/admin/admin-manifest.js +14 -4
- data/app/assets/javascripts/admin/custom_fields.js +4 -2
- data/app/assets/javascripts/admin/data.js +49 -20
- data/app/assets/javascripts/admin/elfinder/upload_elfinder.js +4 -4
- data/app/assets/javascripts/admin/grid-editor.js +390 -113
- data/app/assets/javascripts/admin/i18n.js +22 -0
- data/app/assets/javascripts/admin/jquery.validate.js +2 -54
- data/app/assets/javascripts/admin/{core.js → libraries.js} +92 -76
- data/app/assets/javascripts/admin/login_manifest.js +0 -3
- data/app/assets/javascripts/admin/lte/app.js +758 -0
- data/app/assets/javascripts/admin/modal.js +76 -22
- data/app/assets/javascripts/admin/nav-menu.js +98 -39
- data/app/assets/javascripts/admin/post.js +28 -29
- data/app/assets/javascripts/admin/tinymce/skins/lightgray/content.min.css.scss +1 -1
- data/app/assets/javascripts/admin/tinymce/tinymce.min.js +11 -11
- data/app/assets/javascripts/admin/translator.js +9 -7
- data/app/assets/javascripts/admin/widgets.js +1 -0
- data/app/assets/stylesheets/admin/admin-basic-manifest.css +15 -0
- data/app/assets/stylesheets/admin/admin-manifest.css +7 -11
- data/app/assets/stylesheets/admin/bootstrap-datepicker.css.scss +472 -0
- data/app/assets/stylesheets/admin/bootstrap-datetimepicker.css.scss +339 -0
- data/app/assets/stylesheets/admin/colorpicker.css.scss +95 -0
- data/app/assets/stylesheets/admin/custom_admin.css.scss +160 -0
- data/app/assets/stylesheets/admin/elfinder-manifest.css +1 -1
- data/app/assets/stylesheets/admin/grid-editor.css.scss +14 -299
- data/app/assets/stylesheets/admin/lte/admin.css.scss +4747 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-black-light.css +176 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-black.css +154 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-blue-light.css +167 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-blue.css +142 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-green-light.css +156 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-green.css +134 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-purple-light.css +156 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-purple.css +134 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-red-light.css +156 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-red.css +134 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-yellow-light.css +156 -0
- data/app/assets/stylesheets/admin/lte/skins/skin-yellow.css +134 -0
- data/app/assets/stylesheets/admin/nav-menu.css.scss +33 -0
- data/app/controllers/admin/appearances/nav_menus_controller.rb +13 -10
- data/app/controllers/admin/appearances/themes_controller.rb +1 -2
- data/app/controllers/admin/appearances_controller.rb +0 -4
- data/app/controllers/admin/categories_controller.rb +9 -15
- data/app/controllers/admin/comments_controller.rb +8 -14
- data/app/controllers/admin/grid_editor_controller.rb +55 -0
- data/app/controllers/admin/installers_controller.rb +1 -1
- data/app/controllers/admin/media_controller.rb +1 -3
- data/app/controllers/admin/plugins_controller.rb +2 -2
- data/app/controllers/admin/post_tags_controller.rb +9 -18
- data/app/controllers/admin/posts/drafts_controller.rb +1 -9
- data/app/controllers/admin/posts_controller.rb +12 -15
- data/app/controllers/admin/sessions_controller.rb +6 -7
- data/app/controllers/admin/settings/custom_fields_controller.rb +4 -9
- data/app/controllers/admin/settings/post_types_controller.rb +6 -16
- data/app/controllers/admin/settings/sites_controller.rb +5 -7
- data/app/controllers/admin/settings_controller.rb +0 -4
- data/app/controllers/admin/user_roles_controller.rb +8 -8
- data/app/controllers/admin/users_controller.rb +8 -9
- data/app/controllers/admin_controller.rb +4 -5
- data/app/controllers/apps/plugins_admin_controller.rb +3 -3
- data/app/controllers/apps/plugins_front_controller.rb +2 -2
- data/app/controllers/apps/themes_admin_controller.rb +2 -2
- data/app/controllers/apps/themes_front_controller.rb +2 -2
- data/app/controllers/camaleon_controller.rb +0 -1
- data/app/controllers/concerns/frontend_concern.rb +1 -2
- data/app/controllers/frontend_controller.rb +25 -9
- data/app/decorators/category_decorator.rb +0 -1
- data/app/decorators/custom_field_decorator.rb +0 -1
- data/app/decorators/custom_fields_concern.rb +9 -3
- data/app/decorators/post_comment_decorator.rb +0 -1
- data/app/decorators/post_decorator.rb +10 -4
- data/app/decorators/post_tag_decorator.rb +0 -1
- data/app/decorators/post_type_decorator.rb +0 -1
- data/app/decorators/site_decorator.rb +35 -11
- data/app/decorators/term_taxonomy_decorator.rb +1 -3
- data/app/decorators/theme_decorator.rb +0 -1
- data/app/decorators/user_decorator.rb +7 -5
- data/app/decorators/widget_decorator.rb +0 -1
- data/app/helpers/admin/application_helper.rb +14 -0
- data/app/helpers/admin/menus_helper.rb +8 -8
- data/app/helpers/camaleon_helper.rb +10 -3
- data/app/helpers/captcha_helper.rb +2 -2
- data/app/helpers/frontend/application_helper.rb +0 -1
- data/app/helpers/frontend/nav_menu_helper.rb +2 -1
- data/app/helpers/frontend/seo_helper.rb +1 -2
- data/app/helpers/frontend/site_helper.rb +4 -4
- data/app/helpers/hooks_helper.rb +2 -5
- data/app/helpers/html_helper.rb +9 -7
- data/app/helpers/plugins_helper.rb +34 -8
- data/app/helpers/session_helper.rb +1 -2
- data/app/helpers/short_code_helper.rb +91 -10
- data/app/helpers/site_helper.rb +17 -8
- data/app/helpers/theme_helper.rb +34 -7
- data/app/helpers/uploader_helper.rb +6 -2
- data/app/mailers/html_mailer.rb +15 -6
- data/app/models/category.rb +2 -1
- data/app/models/concerns/custom_fields_read.rb +14 -3
- data/app/models/concerns/metas.rb +7 -4
- data/app/models/custom_field_group.rb +3 -0
- data/app/models/{concerns/metas_saved.rb → grid_template.rb} +7 -2
- data/app/models/meta.rb +0 -1
- data/app/models/nav_menu.rb +15 -1
- data/app/models/nav_menu_item.rb +10 -0
- data/app/models/post.rb +100 -6
- data/app/models/post_comment.rb +6 -0
- data/app/models/post_default.rb +9 -8
- data/app/models/post_relationship.rb +2 -0
- data/app/models/post_type.rb +36 -24
- data/app/models/site.rb +7 -16
- data/app/models/term_taxonomy.rb +3 -2
- data/app/models/theme.rb +5 -0
- data/app/models/widget/assigned.rb +3 -2
- data/app/views/admin/appearances/nav_menus/_custom_fields.html.erb +6 -0
- data/app/views/admin/appearances/{_external_menu.html.erb → nav_menus/_external_menu.html.erb} +8 -10
- data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +35 -0
- data/app/views/admin/appearances/nav_menus/_menu_list.html.erb +22 -0
- data/app/views/admin/appearances/nav_menus/index.html.erb +110 -0
- data/app/views/admin/appearances/themes/index.html.erb +4 -3
- data/app/views/admin/appearances/widgets/main/_sidebar.html.erb +29 -0
- data/app/views/admin/appearances/widgets/main/form.html.erb +1 -1
- data/app/views/admin/appearances/widgets/main/index.html.erb +19 -41
- data/app/views/admin/categories/edit.html.erb +2 -6
- data/app/views/admin/categories/index.html.erb +7 -11
- data/app/views/admin/comments/form.html.erb +4 -7
- data/app/views/admin/comments/index.html.erb +24 -41
- data/app/views/admin/comments/reply.html.erb +9 -10
- data/app/views/admin/grid_editor/form.html.erb +31 -0
- data/app/views/admin/grid_editor/index.html.erb +29 -0
- data/app/views/admin/media/index.html.erb +3 -15
- data/app/views/admin/plugins/_plugins_list.html.erb +1 -2
- data/app/views/admin/post_tags/edit.html.erb +2 -6
- data/app/views/admin/post_tags/index.html.erb +3 -8
- data/app/views/admin/posts/_sidebar.html.erb +136 -0
- data/app/views/admin/posts/form.html.erb +87 -281
- data/app/views/admin/posts/index.html.erb +89 -104
- data/app/views/admin/sessions/forgot.html.erb +7 -13
- data/app/views/admin/sessions/login.html.erb +21 -11
- data/app/views/admin/sessions/register.html.erb +3 -6
- data/app/views/admin/settings/custom_fields/_meta_data.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/_render.html.erb +6 -14
- data/app/views/admin/settings/custom_fields/fields/audio.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/field_attrs.html.erb +3 -5
- data/app/views/admin/settings/custom_fields/fields/file.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/image.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/posts.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/select.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/users.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/fields/video.html.erb +1 -1
- data/app/views/admin/settings/custom_fields/form.html.erb +11 -9
- data/app/views/admin/settings/custom_fields/get_items.html.erb +3 -6
- data/app/views/admin/settings/custom_fields/index.html.erb +3 -10
- data/app/views/admin/settings/languages.html.erb +2 -10
- data/app/views/admin/settings/post_types/_form.html.erb +1 -1
- data/app/views/admin/settings/post_types/edit.html.erb +2 -6
- data/app/views/admin/settings/post_types/index.html.erb +4 -12
- data/app/views/admin/settings/site.html.erb +143 -149
- data/app/views/admin/settings/sites/form.html.erb +4 -19
- data/app/views/admin/settings/sites/index.html.erb +8 -9
- data/app/views/admin/taxonomy/index.html.erb +1 -1
- data/app/views/admin/user_roles/form.html.erb +2 -3
- data/app/views/admin/user_roles/index.html.erb +2 -8
- data/app/views/admin/users/form.html.erb +14 -9
- data/app/views/admin/users/index.html.erb +3 -8
- data/app/views/admin/users/profile_edit.html.erb +21 -14
- data/app/views/default_theme/custom_fields/audio.html.erb +3 -0
- data/app/views/default_theme/custom_fields/checkbox.html.erb +3 -0
- data/app/views/default_theme/custom_fields/checkboxes.html.erb +3 -0
- data/app/views/default_theme/custom_fields/colorpicker.html.erb +3 -0
- data/app/views/default_theme/custom_fields/date.html.erb +3 -0
- data/app/views/default_theme/custom_fields/editor.html.erb +3 -0
- data/app/views/default_theme/custom_fields/email.html.erb +3 -0
- data/app/views/default_theme/custom_fields/field_attrs.html.erb +3 -0
- data/app/views/default_theme/custom_fields/file.html.erb +3 -0
- data/app/views/default_theme/custom_fields/image.html.erb +3 -0
- data/app/views/default_theme/custom_fields/numeric.html.erb +3 -0
- data/app/views/default_theme/custom_fields/phone.html.erb +3 -0
- data/app/views/default_theme/custom_fields/posts.html.erb +3 -0
- data/app/views/default_theme/custom_fields/radio.html.erb +3 -0
- data/app/views/default_theme/custom_fields/select.html.erb +3 -0
- data/app/views/default_theme/custom_fields/select_eval.html.erb +3 -0
- data/app/views/default_theme/custom_fields/text_area.html.erb +3 -0
- data/app/views/default_theme/custom_fields/text_box.html.erb +3 -0
- data/app/views/default_theme/custom_fields/url.html.erb +3 -0
- data/app/views/default_theme/custom_fields/users.html.erb +3 -0
- data/app/views/default_theme/custom_fields/video.html.erb +3 -0
- data/app/views/default_theme/layouts/index.html.erb +2 -2
- data/app/views/default_theme/{post.html.erb → single.html.erb} +1 -1
- data/app/views/default_theme/{post.rss.builder → single.rss.builder} +0 -0
- data/app/views/layouts/admin.html.erb +35 -133
- data/app/views/layouts/admin/_flash_messages.html.erb +1 -15
- data/app/views/layouts/admin/_footer.html.erb +6 -0
- data/app/views/layouts/admin/_header.html.erb +51 -0
- data/app/views/layouts/admin/_sidebar.html.erb +21 -30
- data/app/views/layouts/admin/installer.html.erb +2 -2
- data/app/views/layouts/login.html.erb +15 -33
- data/config/initializers/active_record_extension.rb +14 -2
- data/config/initializers/assets.rb +21 -7
- data/config/initializers/page_caching.rb +1 -2
- data/config/locales/admin/en.yml +17 -9
- data/config/locales/admin/es.yml +8 -3
- data/config/locales/admin/it.yml +4 -2
- data/config/locales/admin/js.yml +147 -0
- data/config/routes/admin.rb +4 -4
- data/config/routes/frontend.rb +2 -2
- data/config/system.json +1 -0
- data/db/migrate/20150926095310_rename_column_posts.rb +18 -0
- data/lib/camaleon_cms.rb +1 -1
- data/lib/camaleon_cms/engine.rb +17 -2
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_generator.rb +122 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb +8 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb +8 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb +22 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/models/plugins/my_plugin/my_plugin.rb +12 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb +2 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/front/index.html.erb +2 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/layouts/readme.txt +2 -0
- data/lib/generators/camaleon_cms/gem_plugin_template/config/camaleon_plugin.json +21 -0
- data/lib/generators/camaleon_cms/install_generator.rb +1 -2
- data/lib/generators/camaleon_cms/install_template/plugin_routes.rb +1 -10
- data/lib/generators/ctheme_template/app/apps/themes/my_theme/config/config.json +5 -5
- data/lib/generators/ctheme_template/app/apps/themes/my_theme/main_helper.rb +6 -5
- data/lib/generators/ctheme_template/app/apps/themes/my_theme/views/layouts/index.html.erb +2 -2
- data/lib/plugin_routes.rb +40 -2
- metadata +257 -22
- data/app/assets/stylesheets/admin/animate/animate.min.css +0 -6
- data/app/assets/stylesheets/admin/bootstrap/bootstrap-datetimepicker.css.scss +0 -339
- data/app/assets/stylesheets/admin/bootstrap/bootstrap.min.css +0 -5
- data/app/assets/stylesheets/admin/core.scss +0 -349
- data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.eot +0 -0
- data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.svg +0 -1831
- data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.ttf +0 -0
- data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.woff +0 -0
- data/app/assets/stylesheets/admin/nav-menu.css +0 -54
- data/app/assets/stylesheets/admin/theme-default.scss +0 -8462
- data/app/models/concerns/site_public.rb +0 -23
- data/app/views/admin/appearances/menu.html.erb +0 -199
- data/lib/Gemfile +0 -25
@@ -23,21 +23,22 @@
|
|
23
23
|
<div class="panel panel-default">
|
24
24
|
<div class="panel-body panel-body-image">
|
25
25
|
<div class="theme-image text-center">
|
26
|
-
<img class="img-responsive" src="<%= asset_path(theme_asset_path(theme[:thumb].to_s, theme[:key])) %>" alt="<%= theme[:name] %>">
|
26
|
+
<img class="img-responsive" style="width: 100%; height: 180px;" src="<%= asset_path(theme_asset_path(theme[:thumb].to_s, theme[:key])) %>" alt="<%= theme[:name] %>">
|
27
27
|
</div>
|
28
28
|
<a href="#" class="panel-body-inform">
|
29
29
|
<span class="fa fa-desktop"></span>
|
30
30
|
</a>
|
31
31
|
</div>
|
32
|
-
<div class="panel-body">
|
32
|
+
<div class="panel-body" style="min-height: 120px;">
|
33
33
|
<h3><%= theme[:name] %></h3>
|
34
|
-
|
35
34
|
<p><%= theme[:description] %></p>
|
36
35
|
</div>
|
37
36
|
<div class="panel-footer text-muted text-right">
|
38
37
|
<% if current_theme.slug == theme[:key] && params[:set].nil? %>
|
39
38
|
<% r = {links: []}; hook_run(theme, "theme_options", r) %>
|
40
39
|
<% r[:links] << link_to(raw(' Import Data (data.json) '), admin_plugins_export_content_settings_path(file: ["app", "apps", 'themes', theme[:key], 'data.json'].join("/"))) if current_site.plugin_installed?('export_content') && File.exist?(File.join(theme["path"], "data.json")) %>
|
40
|
+
<% r[:links] << link_to('Settings', admin_settings_site_path(tab: "theme"), class: "btn btn-primary") if File.exist?(current_theme.settings_file) %>
|
41
|
+
|
41
42
|
<% r[:links] << link_to(raw(' Import Data (data.json) '), "#", {'onclick' => "alert('You need to install import/export plugin to import sample data.'); return false;"}) if !current_site.plugin_installed?('export_content') && File.exist?(File.join(theme["path"], "data.json")) %>
|
42
43
|
<%= raw r[:links].join(" | ") %>
|
43
44
|
<span class="btn btn-success"><%= t('admin.button.actived').upcase %></span>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div id="content-sidebar" class="col-md-4">
|
2
|
+
<a href="<%= new_admin_appearances_widgets_sidebar_path %>" title="<%= t('admin.widgets.create_sidebar') %>" class="ajax_link btn btn-default" ><%= t('admin.widgets.create_sidebar') %></a>
|
3
|
+
<div class="panel panel-default">
|
4
|
+
<div class="panel-body">
|
5
|
+
<div class="row">
|
6
|
+
<% current_site.sidebars.each do |sidebar| %>
|
7
|
+
<div class="item-sidebar panel panel-default panel-toggled" data-id="<%= sidebar.id %>">
|
8
|
+
<div class="panel-heading">
|
9
|
+
<h3 class="panel-title">
|
10
|
+
<%= sidebar.name %><br>
|
11
|
+
<small class="text-muted"><%= sidebar.description %></small>
|
12
|
+
</h3>
|
13
|
+
<ul class="panel-controls">
|
14
|
+
<li><a href="<%= edit_admin_appearances_widgets_sidebar_path(sidebar) %>" class="panel-edit ajax_link" title="<%= t('admin.button.edit')%>"><span class="fa fa fa-edit"></span></a></li>
|
15
|
+
<li><%= link_to raw('<span class="fa fa-times text-danger"></span>'), admin_appearances_widgets_sidebar_path(sidebar), method: :delete, data: { confirm: t('admin.message.delete_item') }, class: "panel-delete", title: "#{t('admin.button.delete')}" %></li>
|
16
|
+
<li><a class="panel-collapse" href="#"><span class="fa fa-angle-down"></span></a></li>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
<div class="sidebar-body panel-body" data-id="<%= sidebar.id %>">
|
20
|
+
<% sidebar.assigned.each do |assign| %>
|
21
|
+
<%= render partial: "admin/appearances/widgets/assign/form", locals: {sidebar: sidebar, assigned: assign, widget: assign.widget} %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%#= f.text_area :excerpt, :class => "form-control", :rows => 2 %>
|
19
19
|
</div>-->
|
20
20
|
<div class="form-group text-right">
|
21
|
-
<button class="btn btn-primary
|
21
|
+
<button class="btn btn-primary" type="submit"><%= t('admin.button.submit')%></button>
|
22
22
|
</div>
|
23
23
|
<script>
|
24
24
|
jQuery(function(){ init_form_validations($("#widget_form")); });
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var sidebar_reorder_url = '<%= admin_appearances_widgets_sidebar_reorder_path(sidebar_id: -1) %>';
|
4
4
|
</script>
|
5
5
|
<%= javascript_include_tag "admin/widgets" %>
|
6
|
-
|
6
|
+
<%#= stylesheet_link_tag "admin/widgets" %>
|
7
7
|
<% add_asset_library('tinymce') %>
|
8
8
|
<div class="page-title">
|
9
9
|
<h2><span class="fa fa-archive"></span> <%= t('admin.sidebar.widgets') %>
|
@@ -12,8 +12,10 @@
|
|
12
12
|
<div class="page-content-wrap">
|
13
13
|
|
14
14
|
<div class="row">
|
15
|
-
<div id="content-widget" class="col-md-
|
16
|
-
<
|
15
|
+
<div id="content-widget" class="col-md-12">
|
16
|
+
<div class="text-right">
|
17
|
+
<a href="<%= new_admin_appearances_widgets_main_path %>" title="<%= t('admin.widgets.create_widget') %>" class="ajax_link btn btn-primary"><%= t('admin.widgets.create_widget') %></a>
|
18
|
+
</div>
|
17
19
|
<div class="panel panel-colorful">
|
18
20
|
<div class="panel-body">
|
19
21
|
<h2 class="panel-title"><%= t('admin.widgets.simple_widgets')%> </h2><br><br>
|
@@ -22,12 +24,14 @@
|
|
22
24
|
<% @widgets.each do |item| %>
|
23
25
|
<% if item.is_simple? %>
|
24
26
|
<div class="panel-widget col-md-3" data-id=<%= item.id %> >
|
25
|
-
<div class="
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<
|
27
|
+
<div class="small-box <%= ["bg-green", "bg-aqua", "bg-yellow", "bg-red"].sample %>" data-id="<%= item.id %>">
|
28
|
+
<div class="inner">
|
29
|
+
<h4><%= item.name %></h4>
|
30
|
+
<p><%= item.excerpt %></p>
|
31
|
+
</div>
|
32
|
+
<%= link_to raw('<span class="fa fa-edit"></span>'), { action: :edit, id: item.id }, class: "ajax_link edit_link", title: "#{t('admin.button.edit')}" %>
|
33
|
+
<%= link_to raw('<span class="fa fa-times"></span>'), { action: :destroy, id: item.id },method: :delete, data: { confirm: t('admin.message.delete_item') }, class: "del_link", title: "#{t('admin.button.delete')}" %>
|
34
|
+
<div class="small-box-footer" style="font-size:11px;"><%= item.short_code %></div>
|
31
35
|
</div>
|
32
36
|
</div>
|
33
37
|
<% end %>
|
@@ -43,9 +47,11 @@
|
|
43
47
|
<% @widgets.each do |item| %>
|
44
48
|
<% unless item.is_simple? %>
|
45
49
|
<div class="panel-widget col-md-3" data-id=<%= item.id %> >
|
46
|
-
<div class="
|
47
|
-
<
|
48
|
-
|
50
|
+
<div class="small-box <%= ["bg-green", "bg-aqua", "bg-yellow", "bg-red"].sample %>" data-id="<%= item.id %>">
|
51
|
+
<div class="inner">
|
52
|
+
<h4><%= item.name %></h4>
|
53
|
+
<p><%= item.excerpt %></p>
|
54
|
+
</div>
|
49
55
|
<div class="informer informer-default dir-bl shortcode" style="font-size:11px;"><%= item.short_code %></div>
|
50
56
|
</div>
|
51
57
|
</div>
|
@@ -58,34 +64,6 @@
|
|
58
64
|
</div>
|
59
65
|
</div>
|
60
66
|
</div>
|
61
|
-
|
62
|
-
<a href="<%= new_admin_appearances_widgets_sidebar_path %>" title="<%= t('admin.widgets.create_sidebar') %>" class="ajax_link btn btn-default" ><%= t('admin.widgets.create_sidebar') %></a>
|
63
|
-
<div class="panel panel-default">
|
64
|
-
<div class="panel-body">
|
65
|
-
<div class="row">
|
66
|
-
<% current_site.sidebars.each do |sidebar| %>
|
67
|
-
<div class="item-sidebar panel panel-default panel-toggled" data-id="<%= sidebar.id %>">
|
68
|
-
<div class="panel-heading">
|
69
|
-
<h3 class="panel-title">
|
70
|
-
<%= sidebar.name %><br>
|
71
|
-
<small class="text-muted"><%= sidebar.description %></small>
|
72
|
-
</h3>
|
73
|
-
<ul class="panel-controls">
|
74
|
-
<li><a href="<%= edit_admin_appearances_widgets_sidebar_path(sidebar) %>" class="panel-edit ajax_link" title="<%= t('admin.button.edit')%>"><span class="fa fa fa-edit"></span></a></li>
|
75
|
-
<li><%= link_to raw('<span class="fa fa-times text-danger"></span>'), admin_appearances_widgets_sidebar_path(sidebar), method: :delete, data: { confirm: t('admin.message.delete_item') }, class: "panel-delete", title: "#{t('admin.button.delete')}" %></li>
|
76
|
-
<li><a class="panel-collapse" href="#"><span class="fa fa-angle-down"></span></a></li>
|
77
|
-
</ul>
|
78
|
-
</div>
|
79
|
-
<div class="sidebar-body panel-body" data-id="<%= sidebar.id %>">
|
80
|
-
<% sidebar.assigned.each do |assign| %>
|
81
|
-
<%= render partial: "admin/appearances/widgets/assign/form", locals: {sidebar: sidebar, assigned: assign, widget: assign.widget} %>
|
82
|
-
<% end %>
|
83
|
-
</div>
|
84
|
-
</div>
|
85
|
-
<% end %>
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
</div>
|
89
|
-
</div>
|
67
|
+
<%#= render "sidebar" %>
|
90
68
|
</div>
|
91
69
|
</div>
|
@@ -1,13 +1,9 @@
|
|
1
|
-
<div class="page-title">
|
2
|
-
<h2><span class="fa fa-folder"></span> <%= "#{@post_type.decorate.the_title.pluralize} / " if @post_type.present? %> <%= t('admin.post_type.category').to_s.titleize.pluralize %></h2>
|
3
|
-
</div>
|
4
1
|
<div class="page-content-wrap">
|
5
|
-
|
6
2
|
<div class="row">
|
7
|
-
<div class="col-md-
|
3
|
+
<div class="col-md-8 col-md-offset-2">
|
8
4
|
<div class="panel panel-default">
|
9
5
|
<div class="panel-heading ui-draggable-handle">
|
10
|
-
<
|
6
|
+
<h4><%= @category.id.present? ? t('admin.post_type.edit_category') : t('admin.post_type.add_category') %></h4>
|
11
7
|
</div>
|
12
8
|
<%= render partial: 'admin/categories/form' %>
|
13
9
|
</div>
|
@@ -1,14 +1,8 @@
|
|
1
|
-
<div class="page-
|
2
|
-
<h2>
|
3
|
-
<span class="fa fa-folder"></span> <%= "#{@post_type.decorate.the_title.pluralize} / " if @post_type.present? %> <%= t('admin.post_type.category').to_s.titleize.pluralize %>
|
4
|
-
</h2>
|
5
|
-
</div>
|
6
|
-
<div class="page-content-wrap">
|
7
|
-
|
1
|
+
<div class="page-content-wrap row">
|
8
2
|
<div class="col-md-4">
|
9
3
|
<div class="panel panel-default">
|
10
4
|
<div class="panel-heading ui-draggable-handle">
|
11
|
-
<
|
5
|
+
<h4><%= t('admin.post_type.add_category')%> </h4>
|
12
6
|
</div>
|
13
7
|
|
14
8
|
<%= render partial: 'admin/categories/form' %>
|
@@ -19,10 +13,12 @@
|
|
19
13
|
|
20
14
|
<div class="col-md-8">
|
21
15
|
|
22
|
-
|
16
|
+
<!-- START BASIC TABLE SAMPLE -->
|
23
17
|
<div class="panel panel-default">
|
24
18
|
<div class="panel-heading ui-draggable-handle">
|
25
|
-
|
19
|
+
<h4>
|
20
|
+
<span class="fa fa-folder"></span> <%= "#{@post_type.decorate.the_title.pluralize} / " if @post_type.present? %> <%= t('admin.post_type.category').to_s.titleize.pluralize %>
|
21
|
+
</h4>
|
26
22
|
</div>
|
27
23
|
<div class="panel-body">
|
28
24
|
|
@@ -68,7 +64,7 @@
|
|
68
64
|
</tbody>
|
69
65
|
</table>
|
70
66
|
<%= content_tag("div", raw(t('admin.message.data_found_list')), class: "alert alert-warning") if @categories.empty? %>
|
71
|
-
|
67
|
+
<%= raw do_pagination(@categories) %>
|
72
68
|
</div>
|
73
69
|
</div>
|
74
70
|
<!-- END BASIC TABLE SAMPLE -->
|
@@ -1,15 +1,12 @@
|
|
1
|
-
<div class="page-title">
|
2
|
-
<h2>
|
3
|
-
<span class="fa fa-users"></span>
|
4
|
-
<%= "Edit "%>
|
5
|
-
</h2>
|
6
|
-
</div>
|
7
1
|
<div class="page-content-wrap">
|
8
2
|
<div class="row">
|
9
3
|
<div class="col-md-6 col-md-offset-3">
|
10
4
|
<div class="panel panel-default">
|
11
5
|
<div class="panel-heading ui-draggable-handle">
|
12
|
-
|
6
|
+
<h4>
|
7
|
+
<span class="fa fa-users"></span>
|
8
|
+
Comment <%= @comment.id.present? ? "Edit" : "Add" %>
|
9
|
+
</h4>
|
13
10
|
</div>
|
14
11
|
<%= form_for @comment, url:{action: @comment.new_record? ? :create : :update} do |f| %>
|
15
12
|
|
@@ -1,28 +1,17 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<div class="page-content-wrap">
|
7
|
-
|
8
|
-
<div class="row">
|
9
|
-
<div class="col-md-12">
|
10
|
-
|
11
|
-
<!-- START BASIC TABLE SAMPLE -->
|
12
|
-
<div class="panel panel-default">
|
13
|
-
<div class="panel-heading">
|
14
|
-
<h3 class="panel-title"><%= t('admin.page_title.list')%></h3>
|
15
|
-
</div>
|
16
|
-
<div class="panel-body">
|
1
|
+
<div class="panel panel-default">
|
2
|
+
<div class="panel-heading">
|
3
|
+
<h4><span class="fa fa-comments"></span> <%= t('admin.comments.comments_list_post')%></h4>
|
4
|
+
</div>
|
5
|
+
<div class="panel-body">
|
17
6
|
|
18
|
-
|
7
|
+
<table class="table">
|
19
8
|
<thead>
|
20
9
|
<tr>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
<th><%= t('admin.table.id')%></th>
|
11
|
+
<th><%= t('admin.table.post')%></th>
|
12
|
+
<th><%= t('admin.table.post_type')%></th>
|
13
|
+
<th><%= t('admin.table.comments')%></th>
|
14
|
+
<th><%= t('admin.table.actions')%></th>
|
26
15
|
</tr>
|
27
16
|
</thead>
|
28
17
|
<tbody>
|
@@ -32,27 +21,21 @@
|
|
32
21
|
post_type = f.post_type.decorate
|
33
22
|
%>
|
34
23
|
<tr>
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
24
|
+
<td><%= f.id %></td>
|
25
|
+
<td><a href="<%= post.the_url %>" target="_blank"><%= post.the_title %></a></td>
|
26
|
+
<td><a href="<%= post_type.the_url %>" target="_blank"><%= post_type.the_title %></a></td>
|
27
|
+
<td><%= f.comments.main.size %></td>
|
28
|
+
<td>
|
29
|
+
<%= link_to raw('<i class="fa fa-comments"></i>'), {action: :responses, post_id: f.id }, class: "btn btn-default btn-xs", title: "#{t('admin.table.comments')}" %>
|
30
|
+
<%= link_to raw('<i class="fa fa-times"></i>'), { action: :destroy_comments, post_id: f.id },
|
31
|
+
method: :delete, data: { confirm: t('admin.message.delete') }, class: "btn btn-danger btn-xs", title: "Delete" %>
|
32
|
+
</td>
|
44
33
|
</tr>
|
45
34
|
<% end %>
|
46
35
|
|
47
36
|
</tbody>
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
<!-- END BASIC TABLE SAMPLE -->
|
37
|
+
</table>
|
38
|
+
<%= content_tag("div", raw(t('admin.message.data_found_list')), class: "alert alert-warning") if @posts.empty? %>
|
39
|
+
<%= raw do_pagination(@posts) %>
|
55
40
|
</div>
|
56
|
-
|
57
|
-
|
58
|
-
</div>
|
41
|
+
</div>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<div class="btn-group btn-group-sm">
|
30
30
|
<button title="<%= t('admin.comments.tooltip.approved_comment') %>" onclick="do_change_status(this, '<%= comment.id%>', 'approved', 'success'); return false;" class="btn btn-default <%= 'btn-primary' if comment[:approved] == "approved" %>"><span class="fa fa-thumbs-o-up"></span></button>
|
31
31
|
<button title="<%= t('admin.comments.tooltip.comment_pending') %>" onclick="do_change_status(this, '<%= comment.id%>', 'pending', 'warning'); return false;" class="btn btn-default <%= 'btn-primary' if comment[:approved] == "pending" %>"><span class="fa fa-warning"></span></button>
|
32
|
-
<button title="<%= t('admin.comments.tooltip.comment_spam') %>" onclick="do_change_status(this, '<%= comment.id%>', 'spam', 'danger'); return false;" class="btn btn-default <%= 'btn-primary' if comment[:approved] == "
|
32
|
+
<button title="<%= t('admin.comments.tooltip.comment_spam') %>" onclick="do_change_status(this, '<%= comment.id%>', 'spam', 'danger'); return false;" class="btn btn-default <%= 'btn-primary' if comment[:approved] == "spam" %>"><span class="fa fa-bug"></span></button>
|
33
33
|
</div>
|
34
34
|
<div class="btn-group btn-group-sm">
|
35
35
|
<button title="<%= t('admin.comments.tooltip.reply_comment') %>" onclick="do_responses_comment(this, <%= comment.id %>, true); return false;" class="btn btn-default"><span class="fa fa-mail-reply"></span></button>
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<div class="btn-group btn-group-sm">
|
88
88
|
<button title="<%= t('admin.comments.tooltip.approved_comment') %>" onclick="do_change_status(this, '<%= children.id%>', 'approved', 'success'); return false;" class="btn btn-default <%= 'btn-primary' if children[:approved] == "approved" %>"><span class="fa fa-thumbs-o-up"></span></button>
|
89
89
|
<button title="<%= t('admin.comments.tooltip.comment_pending') %>" onclick="do_change_status(this, '<%= children.id%>', 'pending', 'warning'); return false;" class="btn btn-default <%= 'btn-primary' if children[:approved] == "pending" %>"><span class="fa fa-warning"></span></button>
|
90
|
-
<button title="<%= t('admin.comments.tooltip.comment_spam') %>" onclick="do_change_status(this, '<%= children.id%>', 'spam', 'danger'); return false;" class="btn btn-default <%= 'btn-primary' if children[:approved] == "
|
90
|
+
<button title="<%= t('admin.comments.tooltip.comment_spam') %>" onclick="do_change_status(this, '<%= children.id%>', 'spam', 'danger'); return false;" class="btn btn-default <%= 'btn-primary' if children[:approved] == "spam" %>"><span class="fa fa-bug"></span></button>
|
91
91
|
</div>
|
92
92
|
<div class="btn-group btn-group-sm">
|
93
93
|
<button title="<%= t('admin.comments.tooltip.delete_comment') %>" onclick="do_delete_comment(this, <%= children.id %>, 'children'); return false;" class="btn btn-default"><span class="fa fa-trash-o"></span></button>
|
@@ -111,8 +111,7 @@
|
|
111
111
|
</div>
|
112
112
|
<script>
|
113
113
|
var form;
|
114
|
-
|
115
|
-
{
|
114
|
+
jQuery(function($){
|
116
115
|
form = $("#menu_form");
|
117
116
|
|
118
117
|
$('.select').change(function(){
|
@@ -151,13 +150,13 @@
|
|
151
150
|
|
152
151
|
switch (value){
|
153
152
|
case "approved":
|
154
|
-
type =
|
153
|
+
type = I18n("msg.approved");
|
155
154
|
break;
|
156
155
|
case "pending":
|
157
|
-
type =
|
156
|
+
type = I18n("msg.pending");
|
158
157
|
break;
|
159
158
|
case "spam":
|
160
|
-
type =
|
159
|
+
type = I18n("msg.spam");
|
161
160
|
break;
|
162
161
|
default:
|
163
162
|
type = ""
|
@@ -168,7 +167,7 @@
|
|
168
167
|
msn = res.notice+type+".";
|
169
168
|
$(dom).parent().find('.btn-primary').removeClass('btn-primary')
|
170
169
|
$(dom).addClass('btn-primary')
|
171
|
-
$.fn.alert({title: msn, type: color, close:
|
170
|
+
$.fn.alert({title: msn, type: color, close: I18n("button.close")});
|
172
171
|
}
|
173
172
|
});
|
174
173
|
|
@@ -176,14 +175,14 @@
|
|
176
175
|
|
177
176
|
function do_delete_comment(comment, id, type_comment){
|
178
177
|
|
179
|
-
var msg =
|
178
|
+
var msg = I18n("msg.delete_item");
|
180
179
|
|
181
180
|
if (confirm(msg)) {
|
182
181
|
var path = '<%= delete_admin_comments_path()%>';
|
183
182
|
var data = {answers_id: id};
|
184
183
|
|
185
184
|
$.post( path, data, function(res){
|
186
|
-
$.fn.alert({title: res.notice, close:
|
185
|
+
$.fn.alert({title: res.notice, close: I18n("button.close")});
|
187
186
|
});
|
188
187
|
|
189
188
|
if (type_comment == "parent"){
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= form_for @grid_template, url:{action: @grid_template.new_record? ? :create : :update}, html: { id: "grid_template_form" } do |f| %>
|
2
|
+
<div class="panel-body">
|
3
|
+
<%= render partial: 'layouts/admin/form_error', locals: {data: @grid_template} %>
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label t('admin.table.name') %><br>
|
6
|
+
<%= f.text_field :name, :class => "form-control required" %>
|
7
|
+
</div>
|
8
|
+
<div class="form-group hidden">
|
9
|
+
<%= f.text_area :description, :class => "form-control", :rows => 4 %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="text-right">
|
13
|
+
<button class="btn btn-primary" type="submit"><%= t('admin.button.submit') %></button>
|
14
|
+
</div>
|
15
|
+
<script>
|
16
|
+
jQuery(function(){
|
17
|
+
var form = $("#grid_template_form");
|
18
|
+
form.validate({
|
19
|
+
submitHandler: function(form){
|
20
|
+
form = $(form);
|
21
|
+
showLoading();
|
22
|
+
$.post(form.attr("action"), form.serialize(), function(res){
|
23
|
+
form.replaceWith(res);
|
24
|
+
hideLoading();
|
25
|
+
});
|
26
|
+
return false;
|
27
|
+
}
|
28
|
+
});
|
29
|
+
});
|
30
|
+
</script>
|
31
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<table class="table table-striped" id="grid_table_list">
|
2
|
+
<% @grid_templates.each do |item| %>
|
3
|
+
<tr>
|
4
|
+
<td><%= item.name %></td>
|
5
|
+
<td class="text-right">
|
6
|
+
<%= link_to("<i class='fa fa-trash'></i>".html_safe, admin_grid_editor_path(item), class: "destroy_item", "data-message" => t("admin.message.delete_item")) %>
|
7
|
+
<%= link_to("<i class='fa fa-pencil'></i>".html_safe, edit_admin_grid_editor_path(item), class: "edit_item") %>
|
8
|
+
<%= link_to("<i class='fa fa-exchange'></i>".html_safe, admin_grid_editor_path(item), class: "import_item", title: t("admin.table.import"), "data-message" => t("admin.message.are_you_sure_to_import")) %>
|
9
|
+
</td>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
12
|
+
<%= content_tag("div", raw(t('admin.message.data_found_list')), class: "alert alert-warning") if @grid_templates.empty? %>
|
13
|
+
</table>
|
14
|
+
<script>
|
15
|
+
jQuery(function(){
|
16
|
+
var table = $("#grid_table_list");
|
17
|
+
table.on("click", ".destroy_item", function(){
|
18
|
+
if(!confirm($(this).attr("data-message"))) return false;
|
19
|
+
showLoading();
|
20
|
+
$.ajax({type: "delete", url: $(this).attr("href"), success: function(res){ table.parent().html(res); hideLoading(); }});
|
21
|
+
return false;
|
22
|
+
});
|
23
|
+
table.on("click", ".edit_item", function(){
|
24
|
+
showLoading();
|
25
|
+
$.get($(this).attr("href"), function(res){ table.parent().html(res); hideLoading(); });
|
26
|
+
return false;
|
27
|
+
});
|
28
|
+
})
|
29
|
+
</script>
|