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
@@ -1,121 +1,106 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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_of') %> <%= @post_type.the_title.pluralize %> <b>(slug = <%= @post_type.the_slug %>)</b></h3>
|
15
|
-
<%= link_to raw("<i class='fa fa-plus'></i> #{t('admin.post_type.add')} #{@post_type.the_title}"), {action: :new}, class: "btn btn-primary pull-right" if can? :create_post, @post_type %>
|
16
|
-
</div>
|
17
|
-
<div class="panel-body">
|
18
|
-
|
19
|
-
<div class="row" style="margin-bottom: 16px">
|
1
|
+
<div class="panel panel-default">
|
2
|
+
<div class="panel-heading">
|
3
|
+
<h4 class="pull-left"><%= t('admin.page_title.list_of') %> <%= @post_type.the_title.pluralize %>
|
4
|
+
<b>(slug = <%= @post_type.the_slug %>)</b></h4>
|
5
|
+
<%= link_to raw("<i class='fa fa-plus'></i> #{t('admin.post_type.add')} #{@post_type.the_title}"), {action: :new}, class: "btn btn-primary pull-right" if can? :create_post, @post_type %>
|
6
|
+
</div>
|
7
|
+
<div class="panel-body">
|
8
|
+
<div class="row" style="margin-bottom: 16px">
|
20
9
|
<div class="col-md-9">
|
21
|
-
|
10
|
+
<%= render partial: "admin/posts/filter_posts" %>
|
22
11
|
</div>
|
23
12
|
<div class="col-md-3">
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
<form action="<%= url_for(action: :index) %>" method="get">
|
14
|
+
<div class="input-group">
|
15
|
+
<input type="text" class="form-control" name="q" value="<%= params[:q] %>">
|
16
|
+
<span class="input-group-btn"><button class="btn btn-default" type="submit">
|
17
|
+
<i class="fa fa-search"></i></button></span>
|
18
|
+
</div>
|
19
|
+
</form>
|
30
20
|
</div>
|
31
|
-
|
32
|
-
|
33
|
-
</div>
|
34
|
-
<table class="table table-hover" id="posts-table-list">
|
21
|
+
</div>
|
22
|
+
<table class="table table-hover" id="posts-table-list">
|
35
23
|
<thead>
|
36
24
|
<tr>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
25
|
+
<th><%= t('admin.table.id') %></th>
|
26
|
+
<th><%= t('admin.table.title') %></th>
|
27
|
+
<th><%= t('admin.table.status') %></th>
|
28
|
+
<th><%= t('admin.table.author') %></th>
|
29
|
+
<% if @post_type.manage_categories? %>
|
30
|
+
<th><%= t('admin.table.categories') %></th>
|
31
|
+
<% end %>
|
32
|
+
<% if @post_type.manage_tags? %>
|
33
|
+
<th><%= t('admin.table.tags') %></th>
|
34
|
+
<% end %>
|
35
|
+
<% extra_column = {post_type: @post_type, content: "", from_body: false}; hooks_run("list_post_extra_columns", extra_column) %>
|
36
|
+
<%= raw extra_column[:content] %>
|
37
|
+
<th><%= t("updated_at") %></th>
|
38
|
+
<th style="width: 98px; text-align: right"><%= t('admin.table.actions') %></th>
|
51
39
|
</tr>
|
52
40
|
</thead>
|
53
41
|
<tbody>
|
54
|
-
<% @posts.eager_load(:categories, :post_tags).each do |f|
|
42
|
+
<% @posts.eager_load(:categories, :post_tags).each do |f|
|
43
|
+
f = f.decorate %>
|
55
44
|
<tr data-id="<%= f.id %>" class="<%= "sortable" if can? :update, f %>">
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<% else %>
|
61
|
-
<%= f.the_title %>
|
62
|
-
<% end %>
|
63
|
-
<%= "*" + " (#{f.parent.decorate.the_title.titleize})" if f.draft? && f.parent.present? %>
|
64
|
-
</td>
|
65
|
-
<td><%= link_to raw(f.the_status), {action: :index, s: f.status } %> </td>
|
66
|
-
<td><%= f.author.fullname %></td>
|
67
|
-
<% if @post_type.manage_categories? %>
|
68
|
-
<td><%= raw post_type_list_taxonomy(f.categories, "success") %></td>
|
69
|
-
<% end %>
|
70
|
-
<% if @post_type.manage_tags? %>
|
71
|
-
<td><%= raw post_type_list_taxonomy(f.post_tags, "default") %></td>
|
72
|
-
<% end %>
|
73
|
-
<% extra_column = {post: f, post_type: @post_type, content: "", from_body: true}; hooks_run("list_post_extra_columns", extra_column) %>
|
74
|
-
<%= raw extra_column[:content] %>
|
75
|
-
<td><%= f.the_updated_at %></td>
|
76
|
-
<td style="text-align: right">
|
77
|
-
<% if f.published? %>
|
78
|
-
<% if f.slug.to_s.translations.present? %>
|
79
|
-
<div class="btn-group">
|
80
|
-
<button class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="<%= t('admin.button.preview') %>"><i class="fa fa-eye"></i> </button>
|
81
|
-
<ul class="dropdown-menu" style="min-width: 50px;">
|
82
|
-
<% f.the_urls.each do |k,url| %>
|
83
|
-
<li><a href="<%= url %>" target="_blank"><%= k.to_s.upcase %></a></li>
|
84
|
-
<% end %>
|
85
|
-
</ul>
|
86
|
-
</div>
|
45
|
+
<td><%= f.id %></td>
|
46
|
+
<td>
|
47
|
+
<% if !f.trash? && (can? :update, f) %>
|
48
|
+
<%= link_to f.the_title, {action: :edit, id: f.id}, class: "" %>
|
87
49
|
<% else %>
|
88
|
-
|
50
|
+
<%= f.the_title %>
|
51
|
+
<% end %>
|
52
|
+
<%= "*" + " (#{f.parent.decorate.the_title.titleize})" if f.draft? && f.parent.present? %>
|
53
|
+
</td>
|
54
|
+
<td><%= link_to raw(f.the_status), {action: :index, s: f.status} %> </td>
|
55
|
+
<td><%= f.author.fullname %></td>
|
56
|
+
<% if @post_type.manage_categories? %>
|
57
|
+
<td><%= raw post_type_list_taxonomy(f.categories, "success") %></td>
|
58
|
+
<% end %>
|
59
|
+
<% if @post_type.manage_tags? %>
|
60
|
+
<td><%= raw post_type_list_taxonomy(f.post_tags, "default") %></td>
|
61
|
+
<% end %>
|
62
|
+
<% extra_column = {post: f, post_type: @post_type, content: "", from_body: true}; hooks_run("list_post_extra_columns", extra_column) %>
|
63
|
+
<%= raw extra_column[:content] %>
|
64
|
+
<td><%= f.the_updated_at %></td>
|
65
|
+
<td style="text-align: right">
|
66
|
+
<% if f.published? %>
|
67
|
+
<% if f.slug.to_s.translations.present? %>
|
68
|
+
<div class="btn-group">
|
69
|
+
<button class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="<%= t('admin.button.preview') %>">
|
70
|
+
<i class="fa fa-eye"></i></button>
|
71
|
+
<ul class="dropdown-menu" style="min-width: 50px;">
|
72
|
+
<% f.the_urls.each do |k, url| %>
|
73
|
+
<li>
|
74
|
+
<a href="<%= url %>" target="_blank"><%= k.to_s.upcase %></a>
|
75
|
+
</li>
|
76
|
+
<% end %>
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
<% else %>
|
80
|
+
<a href="<%= f.the_url %>" class="btn btn-info btn-xs" target="_blank" title="<%= t('admin.button.preview') %>"><i class="fa fa-eye"></i></a>
|
81
|
+
<% end %>
|
89
82
|
<% end %>
|
90
|
-
<% end %>
|
91
|
-
|
92
|
-
<% if f.trash? %>
|
93
|
-
<%= link_to raw('<i class="fa fa-check"></i>'), {action: :restore, post_id: f.id, s: params[:s] }, class: "btn btn-success btn-xs", title: "#{t('admin.button.restore')}" if can? :update, f %>
|
94
|
-
<%= link_to raw('<i class="fa fa-times"></i>'), { action: :destroy, id: f.id, s: params[:s] },
|
95
|
-
method: :delete, data: { confirm: t('admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('admin.button.delete')}" if can? :destroy, f %>
|
96
|
-
<% elsif f.draft? %>
|
97
|
-
<%#= link_to raw('<i class="fa fa-check"></i>'), {action: :edit, id: f.id, recover_draft: 'true' }, class: "btn btn-success btn-xs", title: "#{t('admin.button.recover')}" if can? :update, f %>
|
98
|
-
<%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: f.id }, class: "btn btn-default btn-xs", title: "#{t('admin.button.edit')}" if can? :update, f %>
|
99
|
-
<%= link_to raw('<i class="fa fa-trash"></i>'), { action: :trash, post_id: f.id, s: params[:s] },
|
100
|
-
data: { confirm: t('admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('admin.button.delete')}" if can? :destroy, f %>
|
101
|
-
<% else %>
|
102
|
-
<%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: f.id }, class: "btn btn-default btn-xs", title: "#{t('admin.button.edit')}" if can? :update, f %>
|
103
|
-
<%= link_to raw('<i class="fa fa-trash"></i>'), { action: :trash, post_id: f.id, s: params[:s] },
|
104
|
-
data: { confirm: t('admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('admin.button.move_trash')}" if can? :destroy, f %>
|
105
|
-
<% end %>
|
106
83
|
|
107
|
-
|
84
|
+
<% if f.trash? %>
|
85
|
+
<%= link_to raw('<i class="fa fa-check"></i>'), {action: :restore, post_id: f.id, s: params[:s]}, class: "btn btn-success btn-xs", title: "#{t('admin.button.restore')}" if can? :update, f %>
|
86
|
+
<%= link_to raw('<i class="fa fa-times"></i>'), {action: :destroy, id: f.id, s: params[:s]},
|
87
|
+
method: :delete, data: {confirm: t('admin.message.delete')}, class: "btn btn-danger btn-xs", title: "#{t('admin.button.delete')}" if can? :destroy, f %>
|
88
|
+
<% elsif f.draft? %>
|
89
|
+
<%#= link_to raw('<i class="fa fa-check"></i>'), {action: :edit, id: f.id, recover_draft: 'true' }, class: "btn btn-success btn-xs", title: "#{t('admin.button.recover')}" if can? :update, f %>
|
90
|
+
<%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: f.id}, class: "btn btn-default btn-xs", title: "#{t('admin.button.edit')}" if can? :update, f %>
|
91
|
+
<%= link_to raw('<i class="fa fa-trash"></i>'), {action: :trash, post_id: f.id, s: params[:s]},
|
92
|
+
data: {confirm: t('admin.message.delete')}, class: "btn btn-danger btn-xs", title: "#{t('admin.button.delete')}" if can? :destroy, f %>
|
93
|
+
<% else %>
|
94
|
+
<%= link_to raw('<i class="fa fa-pencil"></i>'), {action: :edit, id: f.id}, class: "btn btn-default btn-xs", title: "#{t('admin.button.edit')}" if can? :update, f %>
|
95
|
+
<%= link_to raw('<i class="fa fa-trash"></i>'), {action: :trash, post_id: f.id, s: params[:s]},
|
96
|
+
data: {confirm: t('admin.message.delete')}, class: "btn btn-danger btn-xs", title: "#{t('admin.button.move_trash')}" if can? :destroy, f %>
|
97
|
+
<% end %>
|
98
|
+
</td>
|
108
99
|
</tr>
|
109
100
|
<% end %>
|
110
|
-
|
111
101
|
</tbody>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
</div>
|
116
|
-
</div>
|
117
|
-
<!-- END BASIC TABLE SAMPLE -->
|
102
|
+
</table>
|
103
|
+
<%= content_tag("div", raw(t('admin.message.data_found_list')), class: "alert alert-warning") if @posts.empty? %>
|
104
|
+
<%= raw do_pagination(@posts) %>
|
118
105
|
</div>
|
119
|
-
|
120
|
-
|
121
|
-
</div>
|
106
|
+
</div>
|
@@ -1,14 +1,9 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
<div class="login-body">
|
4
|
-
|
5
|
-
|
6
4
|
<%= render "layouts/admin/flash_messages" %>
|
7
|
-
|
8
|
-
|
9
5
|
<% if @form_reset.present? %>
|
10
|
-
|
11
|
-
<div class="login-title"><%= t('admin.login.reset_password') %></div>
|
6
|
+
<h3 class="login-title"><%= t('admin.login.reset_password') %></h3>
|
12
7
|
<%= form_for(@user, :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" }, :url => admin_forgot_path({h: params[:h]}) ) do |f| %>
|
13
8
|
<div class="form-group">
|
14
9
|
<div class="col-md-12">
|
@@ -22,13 +17,12 @@
|
|
22
17
|
</div>
|
23
18
|
<div class="form-group">
|
24
19
|
<div class="col-md-12">
|
25
|
-
<button class="btn btn-
|
20
|
+
<button class="btn btn-primary btn-block"><%= t('admin.button.enter') %></button>
|
26
21
|
</div>
|
27
22
|
</div>
|
28
23
|
<% end %>
|
29
|
-
|
30
24
|
<% else %>
|
31
|
-
<
|
25
|
+
<h3 class="login-title"><%= raw t('admin.login.reset_password_html')%> </h3>
|
32
26
|
<%= form_for(@user, :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" }, :url => admin_forgot_path ) do |f| %>
|
33
27
|
<div class="form-group">
|
34
28
|
<div class="col-md-12">
|
@@ -37,14 +31,14 @@
|
|
37
31
|
</div>
|
38
32
|
<div class="form-group">
|
39
33
|
<div class="col-md-12">
|
40
|
-
<button class="btn btn-
|
34
|
+
<button class="btn btn-primary btn-block"><%= t('admin.button.submit') %></button>
|
41
35
|
</div>
|
42
36
|
</div>
|
43
37
|
<% end %>
|
44
|
-
|
45
38
|
<% end %>
|
46
|
-
|
47
|
-
|
39
|
+
<div class="text-right">
|
40
|
+
<%= link_to("#{t("common.login")}»".html_safe, admin_login_path, class: "btn btn-default") %>
|
41
|
+
</div>
|
48
42
|
</div>
|
49
43
|
|
50
44
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<script>var kk = "<%= get_session_id %>";</script>
|
2
|
+
<%= javascript_include_tag "admin/login_manifest" %>
|
2
3
|
<div class="login-body">
|
3
|
-
<
|
4
|
+
<h3 class="login-box-msg"><%= raw t('admin.login.welcome_login_html') %> </h3>
|
4
5
|
<%= render "layouts/admin/flash_messages" %>
|
5
6
|
<%= form_for(@user, :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" }, :url => admin_login_path ) do |f| %>
|
6
7
|
<div class="form-group">
|
@@ -19,21 +20,30 @@
|
|
19
20
|
</div>
|
20
21
|
</div>
|
21
22
|
|
22
|
-
<div class="
|
23
|
-
<div class="col-
|
24
|
-
<
|
23
|
+
<div class="row">
|
24
|
+
<div class="col-xs-6">
|
25
|
+
<div class="checkbox">
|
26
|
+
<label><input name="remember_me" type="checkbox"> <%= t("admin.login.remember_me") %> </label>
|
27
|
+
</div>
|
25
28
|
</div>
|
26
|
-
|
27
|
-
|
29
|
+
<!-- /.col -->
|
30
|
+
<div class="col-xs-6">
|
31
|
+
<button type="submit" class="btn btn-primary btn-block btn-flat"><%= t('admin.button.log_in') %></button>
|
28
32
|
</div>
|
33
|
+
<!-- /.col -->
|
29
34
|
</div>
|
35
|
+
<hr>
|
36
|
+
|
30
37
|
<%= raw content_before_draw %>
|
31
38
|
<%= r = {html: ""}; hooks_run("user_login_form", r); raw(r[:html]); %>
|
32
39
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
40
|
+
<div class="row">
|
41
|
+
<% if current_site.get_option('has_create_account', false) %>
|
42
|
+
<div class="col-xs-6"><%= t('admin.login.do_not_have_account_yet') %><br> <a href="<%= admin_register_path %>"><%= t('admin.login.create_account') %></a></div>
|
43
|
+
<% end %>
|
44
|
+
<div class="col-xs-6">
|
45
|
+
<a href="<%= admin_forgot_path %>" class=""><%= t('admin.login.forgot_your_password_int') %></a>
|
46
|
+
</div>
|
37
47
|
</div>
|
38
48
|
<% end %>
|
39
|
-
</div>
|
49
|
+
</div>
|
@@ -1,12 +1,9 @@
|
|
1
1
|
<div class="login-body">
|
2
2
|
<%= render "layouts/admin/flash_messages" %>
|
3
3
|
|
4
|
-
<
|
5
|
-
|
4
|
+
<h3 class="login-title"><%= raw t('admin.login.msg_registration_html') %></h3>
|
6
5
|
<%= form_for(@user, :url => admin_register_path, :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" } ) do |f| %>
|
7
|
-
|
8
6
|
<%= render partial: 'layouts/admin/form_error', locals: {data: @user} %>
|
9
|
-
|
10
7
|
<h4><%= t('admin.login.personal_info') %></h4>
|
11
8
|
<div class="form-group">
|
12
9
|
<div class="col-md-12">
|
@@ -49,7 +46,7 @@
|
|
49
46
|
</div>
|
50
47
|
</div>
|
51
48
|
|
52
|
-
<%= r = {html: ""}; hooks_run("user_register_form", r); raw(r[:html]); %>
|
49
|
+
<%= r = {html: "", f: f}; hooks_run("user_register_form", r); raw(r[:html]); %>
|
53
50
|
|
54
51
|
<div class="form-group push-up-30">
|
55
52
|
<div class="col-md-6">
|
@@ -60,4 +57,4 @@
|
|
60
57
|
</div>
|
61
58
|
</div>
|
62
59
|
<% end %>
|
63
|
-
</div>
|
60
|
+
</div>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<% @default_use = record.new_record?
|
2
2
|
@field_name = (defined?(fields_name) ? fields_name : "field_options").to_sym
|
3
3
|
%>
|
4
|
-
<% add_asset_library("custom_field") %>
|
5
4
|
<% field_groups.each do |group| %>
|
6
5
|
<% if defined?(skip_panel) || group.slug == "_default" %>
|
7
6
|
<div class="panel panel-default panel-lite c-field-group" data-slug="<%= group.slug %>">
|
@@ -22,7 +21,7 @@
|
|
22
21
|
@field = field.decorate
|
23
22
|
@field = @field || {options:{}}
|
24
23
|
@rand = "r#{Time.now.to_i}#{rand(99 ... 99999)}d"
|
25
|
-
values = record.
|
24
|
+
values = record.get_fields(@field.slug)
|
26
25
|
values = params[@field_name][@field.slug.to_sym][:values] if values.blank? && params[@field_name].present?
|
27
26
|
%>
|
28
27
|
<div class="item-custom-field c-field-<%= @field.options[:field_key] %>">
|
@@ -38,29 +37,22 @@
|
|
38
37
|
<% end %>
|
39
38
|
<input name="<%= @field_name %>[<%= @field.slug %>][id]" type="hidden" value="<%= @field.id %>"/>
|
40
39
|
<div id="content-field-<%= @rand %>" class="editor-custom-fields">
|
41
|
-
|
42
40
|
<div class="clone-field hidden">
|
43
|
-
<div class="input-group">
|
41
|
+
<div class="input-group-parent">
|
44
42
|
<% if @field.options[:multiple].to_s.to_bool %>
|
45
43
|
<div class="actions">
|
46
44
|
<i class="fa fa-arrows"></i> <i class="fa fa-times text-danger"></i>
|
47
45
|
</div>
|
48
46
|
<% end %>
|
49
|
-
|
50
|
-
<div class="group-input-fields">
|
51
|
-
<%= render file: "admin/settings/custom_fields/fields/#{@field.options[:field_key]}" %>
|
52
|
-
</div>
|
53
|
-
|
47
|
+
<%= render file: "admin/settings/custom_fields/fields/#{@field.options[:field_key]}" %>
|
54
48
|
</div>
|
55
49
|
</div>
|
56
50
|
|
57
|
-
<
|
58
|
-
<ul id="sortable-<%= @rand %>" >
|
51
|
+
<ul id="sortable-<%= @rand %>" >
|
59
52
|
|
60
|
-
|
61
|
-
</div>
|
53
|
+
</ul>
|
62
54
|
<% if @field.options[:multiple].to_s.to_bool %>
|
63
|
-
<div
|
55
|
+
<div class="field_multiple_btn">
|
64
56
|
<a class="btn btn-warning btn-sm btn-add-field" href="#"> <i class="fa fa-plus"></i> <%= t('admin.button.add_new_field')%></a>
|
65
57
|
</div>
|
66
58
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="group-input-fields-content">
|
1
|
+
<div class="group-input-fields-content input-group">
|
2
2
|
<input type="url" name="<%= @field_name %>[<%= @field.slug %>][values][]" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>" />
|
3
3
|
<span class="input-group-addon btn_upload" onclick="load_upload_audio_field(this);return false;"><i class="fa fa-upload"></i> <%= t('admin.button.upload_audio')%></span>
|
4
4
|
</div>
|
@@ -1,10 +1,8 @@
|
|
1
|
-
<div class="group-input-fields-content" data-callback-set-value="custom_field_field_attrs_val">
|
2
|
-
<div class="row">
|
1
|
+
<div class="group-input-fields-content row" data-callback-set-value="custom_field_field_attrs_val">
|
3
2
|
<div class="col-md-4">
|
4
|
-
|
3
|
+
<input type="text" name="<%= @field_name %>[<%= @field.slug %>][values][][attr]" placeholder="<%= t('admin.table.attribute') %>" class="form-control input-attr <%= "required" if @field.options[:required].to_s.to_bool %>"/>
|
5
4
|
</div>
|
6
5
|
<div class="col-md-8">
|
7
|
-
|
6
|
+
<input type="text" name="<%= @field_name %>[<%= @field.slug %>][values][][value]" placeholder="<%= t('admin.table.value') %>" class="form-control input-value"/>
|
8
7
|
</div>
|
9
|
-
</div>
|
10
8
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="group-input-fields-content">
|
1
|
+
<div class="group-input-fields-content input-group">
|
2
2
|
<input type="url" data-formats="<%= @field.options[:formats] || "" %>" name="<%= @field_name %>[<%= @field.slug %>][values][]" class="form-control input-value file_format <%= "required" if @field.options[:required].to_s.to_bool %>" />
|
3
3
|
<span class="input-group-addon btn_upload" onclick="load_upload_file_field(this);return false;"><i class="fa fa-upload"></i> <%= t('admin.button.upload_file') %></span>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="group-input-fields-content">
|
1
|
+
<div class="group-input-fields-content input-group">
|
2
2
|
<input type="url" name="<%= @field_name %>[<%= @field.slug %>][values][]" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>" />
|
3
3
|
<span class="input-group-addon btn_upload" onclick="load_upload_image_field(this);return false;"><i class="fa fa-upload"></i> <%= t('admin.button.upload_image')%></span>
|
4
4
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="group-input-fields-content">
|
2
|
-
<select name="<%= @field_name %>[<%= @field.slug %>][values][]"
|
2
|
+
<select name="<%= @field_name %>[<%= @field.slug %>][values][]" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>">
|
3
3
|
<option value=""></option>
|
4
4
|
<% if @field.options[:post_types].present? %>
|
5
5
|
<% (@field.options[:post_types].include?("all") ? current_site.post_types : current_site.post_types.where(id: @field.options[:post_types])).each do |pt| %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="group-input-fields-content">
|
2
|
-
<select name="<%= @field_name %>[<%= @field.slug %>][values][]"
|
2
|
+
<select name="<%= @field_name %>[<%= @field.slug %>][values][]" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>">
|
3
3
|
<% @field.options[:multiple_options].each do |option| %>
|
4
4
|
<option value="<%= option[:value] %>" <%= 'selected' if @default_use && option[:default].present? %>><%= option[:title] %></option>
|
5
5
|
<% end %>
|