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.

Files changed (266) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +266 -0
  3. data/app/apps/plugins/attack/config/config.json +1 -1
  4. data/app/apps/plugins/contact_form/config/config.json +1 -1
  5. data/app/apps/plugins/contact_form/contact_form_html_helper.rb +15 -10
  6. data/app/apps/plugins/contact_form/front_controller.rb +1 -0
  7. data/app/apps/plugins/contact_form/views/admin_forms/edit.html.erb +1 -2
  8. data/app/apps/plugins/contact_form/views/admin_forms/index.html.erb +1 -1
  9. data/app/apps/plugins/contact_form/views/admin_forms/responses.html.erb +1 -1
  10. data/app/apps/plugins/contact_form/views/forms_shorcode.html.erb +6 -6
  11. data/app/apps/plugins/front_cache/config/config.json +1 -1
  12. data/app/apps/plugins/front_cache/views/admin/settings.html.erb +1 -1
  13. data/app/apps/plugins/visibility_post/config/config.json +1 -1
  14. data/app/apps/themes/camaleon_first/assets/css/style-ver.css.scss +59 -32
  15. data/app/apps/themes/camaleon_first/views/layouts/index.html.erb +2 -2
  16. data/app/apps/themes/default/assets/css/style.css.scss +3 -0
  17. data/app/apps/themes/default/views/category.html.erb +1 -1
  18. data/app/apps/themes/default/views/post_tag.html.erb +1 -1
  19. data/app/apps/themes/default/views/post_type.html.erb +1 -1
  20. data/app/apps/themes/default/views/search.html.erb +1 -1
  21. data/app/apps/themes/new/views/category.html.erb +1 -1
  22. data/app/apps/themes/new/views/layouts/index.html.erb +2 -2
  23. data/app/apps/themes/new/views/post_tag.html.erb +1 -1
  24. data/app/apps/themes/new/views/post_type.html.erb +1 -1
  25. data/app/apps/themes/new/views/search.html.erb +1 -1
  26. data/app/assets/{stylesheets/admin/bootstrap/images → images/admin}/glyphicons-halflings.png +0 -0
  27. data/app/assets/javascripts/admin/actions.js +12 -205
  28. data/app/assets/javascripts/admin/admin-basic-manifest.js +3 -0
  29. data/app/assets/javascripts/admin/admin-manifest.js +14 -4
  30. data/app/assets/javascripts/admin/custom_fields.js +4 -2
  31. data/app/assets/javascripts/admin/data.js +49 -20
  32. data/app/assets/javascripts/admin/elfinder/upload_elfinder.js +4 -4
  33. data/app/assets/javascripts/admin/grid-editor.js +390 -113
  34. data/app/assets/javascripts/admin/i18n.js +22 -0
  35. data/app/assets/javascripts/admin/jquery.validate.js +2 -54
  36. data/app/assets/javascripts/admin/{core.js → libraries.js} +92 -76
  37. data/app/assets/javascripts/admin/login_manifest.js +0 -3
  38. data/app/assets/javascripts/admin/lte/app.js +758 -0
  39. data/app/assets/javascripts/admin/modal.js +76 -22
  40. data/app/assets/javascripts/admin/nav-menu.js +98 -39
  41. data/app/assets/javascripts/admin/post.js +28 -29
  42. data/app/assets/javascripts/admin/tinymce/skins/lightgray/content.min.css.scss +1 -1
  43. data/app/assets/javascripts/admin/tinymce/tinymce.min.js +11 -11
  44. data/app/assets/javascripts/admin/translator.js +9 -7
  45. data/app/assets/javascripts/admin/widgets.js +1 -0
  46. data/app/assets/stylesheets/admin/admin-basic-manifest.css +15 -0
  47. data/app/assets/stylesheets/admin/admin-manifest.css +7 -11
  48. data/app/assets/stylesheets/admin/bootstrap-datepicker.css.scss +472 -0
  49. data/app/assets/stylesheets/admin/bootstrap-datetimepicker.css.scss +339 -0
  50. data/app/assets/stylesheets/admin/colorpicker.css.scss +95 -0
  51. data/app/assets/stylesheets/admin/custom_admin.css.scss +160 -0
  52. data/app/assets/stylesheets/admin/elfinder-manifest.css +1 -1
  53. data/app/assets/stylesheets/admin/grid-editor.css.scss +14 -299
  54. data/app/assets/stylesheets/admin/lte/admin.css.scss +4747 -0
  55. data/app/assets/stylesheets/admin/lte/skins/skin-black-light.css +176 -0
  56. data/app/assets/stylesheets/admin/lte/skins/skin-black.css +154 -0
  57. data/app/assets/stylesheets/admin/lte/skins/skin-blue-light.css +167 -0
  58. data/app/assets/stylesheets/admin/lte/skins/skin-blue.css +142 -0
  59. data/app/assets/stylesheets/admin/lte/skins/skin-green-light.css +156 -0
  60. data/app/assets/stylesheets/admin/lte/skins/skin-green.css +134 -0
  61. data/app/assets/stylesheets/admin/lte/skins/skin-purple-light.css +156 -0
  62. data/app/assets/stylesheets/admin/lte/skins/skin-purple.css +134 -0
  63. data/app/assets/stylesheets/admin/lte/skins/skin-red-light.css +156 -0
  64. data/app/assets/stylesheets/admin/lte/skins/skin-red.css +134 -0
  65. data/app/assets/stylesheets/admin/lte/skins/skin-yellow-light.css +156 -0
  66. data/app/assets/stylesheets/admin/lte/skins/skin-yellow.css +134 -0
  67. data/app/assets/stylesheets/admin/nav-menu.css.scss +33 -0
  68. data/app/controllers/admin/appearances/nav_menus_controller.rb +13 -10
  69. data/app/controllers/admin/appearances/themes_controller.rb +1 -2
  70. data/app/controllers/admin/appearances_controller.rb +0 -4
  71. data/app/controllers/admin/categories_controller.rb +9 -15
  72. data/app/controllers/admin/comments_controller.rb +8 -14
  73. data/app/controllers/admin/grid_editor_controller.rb +55 -0
  74. data/app/controllers/admin/installers_controller.rb +1 -1
  75. data/app/controllers/admin/media_controller.rb +1 -3
  76. data/app/controllers/admin/plugins_controller.rb +2 -2
  77. data/app/controllers/admin/post_tags_controller.rb +9 -18
  78. data/app/controllers/admin/posts/drafts_controller.rb +1 -9
  79. data/app/controllers/admin/posts_controller.rb +12 -15
  80. data/app/controllers/admin/sessions_controller.rb +6 -7
  81. data/app/controllers/admin/settings/custom_fields_controller.rb +4 -9
  82. data/app/controllers/admin/settings/post_types_controller.rb +6 -16
  83. data/app/controllers/admin/settings/sites_controller.rb +5 -7
  84. data/app/controllers/admin/settings_controller.rb +0 -4
  85. data/app/controllers/admin/user_roles_controller.rb +8 -8
  86. data/app/controllers/admin/users_controller.rb +8 -9
  87. data/app/controllers/admin_controller.rb +4 -5
  88. data/app/controllers/apps/plugins_admin_controller.rb +3 -3
  89. data/app/controllers/apps/plugins_front_controller.rb +2 -2
  90. data/app/controllers/apps/themes_admin_controller.rb +2 -2
  91. data/app/controllers/apps/themes_front_controller.rb +2 -2
  92. data/app/controllers/camaleon_controller.rb +0 -1
  93. data/app/controllers/concerns/frontend_concern.rb +1 -2
  94. data/app/controllers/frontend_controller.rb +25 -9
  95. data/app/decorators/category_decorator.rb +0 -1
  96. data/app/decorators/custom_field_decorator.rb +0 -1
  97. data/app/decorators/custom_fields_concern.rb +9 -3
  98. data/app/decorators/post_comment_decorator.rb +0 -1
  99. data/app/decorators/post_decorator.rb +10 -4
  100. data/app/decorators/post_tag_decorator.rb +0 -1
  101. data/app/decorators/post_type_decorator.rb +0 -1
  102. data/app/decorators/site_decorator.rb +35 -11
  103. data/app/decorators/term_taxonomy_decorator.rb +1 -3
  104. data/app/decorators/theme_decorator.rb +0 -1
  105. data/app/decorators/user_decorator.rb +7 -5
  106. data/app/decorators/widget_decorator.rb +0 -1
  107. data/app/helpers/admin/application_helper.rb +14 -0
  108. data/app/helpers/admin/menus_helper.rb +8 -8
  109. data/app/helpers/camaleon_helper.rb +10 -3
  110. data/app/helpers/captcha_helper.rb +2 -2
  111. data/app/helpers/frontend/application_helper.rb +0 -1
  112. data/app/helpers/frontend/nav_menu_helper.rb +2 -1
  113. data/app/helpers/frontend/seo_helper.rb +1 -2
  114. data/app/helpers/frontend/site_helper.rb +4 -4
  115. data/app/helpers/hooks_helper.rb +2 -5
  116. data/app/helpers/html_helper.rb +9 -7
  117. data/app/helpers/plugins_helper.rb +34 -8
  118. data/app/helpers/session_helper.rb +1 -2
  119. data/app/helpers/short_code_helper.rb +91 -10
  120. data/app/helpers/site_helper.rb +17 -8
  121. data/app/helpers/theme_helper.rb +34 -7
  122. data/app/helpers/uploader_helper.rb +6 -2
  123. data/app/mailers/html_mailer.rb +15 -6
  124. data/app/models/category.rb +2 -1
  125. data/app/models/concerns/custom_fields_read.rb +14 -3
  126. data/app/models/concerns/metas.rb +7 -4
  127. data/app/models/custom_field_group.rb +3 -0
  128. data/app/models/{concerns/metas_saved.rb → grid_template.rb} +7 -2
  129. data/app/models/meta.rb +0 -1
  130. data/app/models/nav_menu.rb +15 -1
  131. data/app/models/nav_menu_item.rb +10 -0
  132. data/app/models/post.rb +100 -6
  133. data/app/models/post_comment.rb +6 -0
  134. data/app/models/post_default.rb +9 -8
  135. data/app/models/post_relationship.rb +2 -0
  136. data/app/models/post_type.rb +36 -24
  137. data/app/models/site.rb +7 -16
  138. data/app/models/term_taxonomy.rb +3 -2
  139. data/app/models/theme.rb +5 -0
  140. data/app/models/widget/assigned.rb +3 -2
  141. data/app/views/admin/appearances/nav_menus/_custom_fields.html.erb +6 -0
  142. data/app/views/admin/appearances/{_external_menu.html.erb → nav_menus/_external_menu.html.erb} +8 -10
  143. data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +35 -0
  144. data/app/views/admin/appearances/nav_menus/_menu_list.html.erb +22 -0
  145. data/app/views/admin/appearances/nav_menus/index.html.erb +110 -0
  146. data/app/views/admin/appearances/themes/index.html.erb +4 -3
  147. data/app/views/admin/appearances/widgets/main/_sidebar.html.erb +29 -0
  148. data/app/views/admin/appearances/widgets/main/form.html.erb +1 -1
  149. data/app/views/admin/appearances/widgets/main/index.html.erb +19 -41
  150. data/app/views/admin/categories/edit.html.erb +2 -6
  151. data/app/views/admin/categories/index.html.erb +7 -11
  152. data/app/views/admin/comments/form.html.erb +4 -7
  153. data/app/views/admin/comments/index.html.erb +24 -41
  154. data/app/views/admin/comments/reply.html.erb +9 -10
  155. data/app/views/admin/grid_editor/form.html.erb +31 -0
  156. data/app/views/admin/grid_editor/index.html.erb +29 -0
  157. data/app/views/admin/media/index.html.erb +3 -15
  158. data/app/views/admin/plugins/_plugins_list.html.erb +1 -2
  159. data/app/views/admin/post_tags/edit.html.erb +2 -6
  160. data/app/views/admin/post_tags/index.html.erb +3 -8
  161. data/app/views/admin/posts/_sidebar.html.erb +136 -0
  162. data/app/views/admin/posts/form.html.erb +87 -281
  163. data/app/views/admin/posts/index.html.erb +89 -104
  164. data/app/views/admin/sessions/forgot.html.erb +7 -13
  165. data/app/views/admin/sessions/login.html.erb +21 -11
  166. data/app/views/admin/sessions/register.html.erb +3 -6
  167. data/app/views/admin/settings/custom_fields/_meta_data.html.erb +1 -1
  168. data/app/views/admin/settings/custom_fields/_render.html.erb +6 -14
  169. data/app/views/admin/settings/custom_fields/fields/audio.html.erb +1 -1
  170. data/app/views/admin/settings/custom_fields/fields/field_attrs.html.erb +3 -5
  171. data/app/views/admin/settings/custom_fields/fields/file.html.erb +1 -1
  172. data/app/views/admin/settings/custom_fields/fields/image.html.erb +1 -1
  173. data/app/views/admin/settings/custom_fields/fields/posts.html.erb +1 -1
  174. data/app/views/admin/settings/custom_fields/fields/select.html.erb +1 -1
  175. data/app/views/admin/settings/custom_fields/fields/users.html.erb +1 -1
  176. data/app/views/admin/settings/custom_fields/fields/video.html.erb +1 -1
  177. data/app/views/admin/settings/custom_fields/form.html.erb +11 -9
  178. data/app/views/admin/settings/custom_fields/get_items.html.erb +3 -6
  179. data/app/views/admin/settings/custom_fields/index.html.erb +3 -10
  180. data/app/views/admin/settings/languages.html.erb +2 -10
  181. data/app/views/admin/settings/post_types/_form.html.erb +1 -1
  182. data/app/views/admin/settings/post_types/edit.html.erb +2 -6
  183. data/app/views/admin/settings/post_types/index.html.erb +4 -12
  184. data/app/views/admin/settings/site.html.erb +143 -149
  185. data/app/views/admin/settings/sites/form.html.erb +4 -19
  186. data/app/views/admin/settings/sites/index.html.erb +8 -9
  187. data/app/views/admin/taxonomy/index.html.erb +1 -1
  188. data/app/views/admin/user_roles/form.html.erb +2 -3
  189. data/app/views/admin/user_roles/index.html.erb +2 -8
  190. data/app/views/admin/users/form.html.erb +14 -9
  191. data/app/views/admin/users/index.html.erb +3 -8
  192. data/app/views/admin/users/profile_edit.html.erb +21 -14
  193. data/app/views/default_theme/custom_fields/audio.html.erb +3 -0
  194. data/app/views/default_theme/custom_fields/checkbox.html.erb +3 -0
  195. data/app/views/default_theme/custom_fields/checkboxes.html.erb +3 -0
  196. data/app/views/default_theme/custom_fields/colorpicker.html.erb +3 -0
  197. data/app/views/default_theme/custom_fields/date.html.erb +3 -0
  198. data/app/views/default_theme/custom_fields/editor.html.erb +3 -0
  199. data/app/views/default_theme/custom_fields/email.html.erb +3 -0
  200. data/app/views/default_theme/custom_fields/field_attrs.html.erb +3 -0
  201. data/app/views/default_theme/custom_fields/file.html.erb +3 -0
  202. data/app/views/default_theme/custom_fields/image.html.erb +3 -0
  203. data/app/views/default_theme/custom_fields/numeric.html.erb +3 -0
  204. data/app/views/default_theme/custom_fields/phone.html.erb +3 -0
  205. data/app/views/default_theme/custom_fields/posts.html.erb +3 -0
  206. data/app/views/default_theme/custom_fields/radio.html.erb +3 -0
  207. data/app/views/default_theme/custom_fields/select.html.erb +3 -0
  208. data/app/views/default_theme/custom_fields/select_eval.html.erb +3 -0
  209. data/app/views/default_theme/custom_fields/text_area.html.erb +3 -0
  210. data/app/views/default_theme/custom_fields/text_box.html.erb +3 -0
  211. data/app/views/default_theme/custom_fields/url.html.erb +3 -0
  212. data/app/views/default_theme/custom_fields/users.html.erb +3 -0
  213. data/app/views/default_theme/custom_fields/video.html.erb +3 -0
  214. data/app/views/default_theme/layouts/index.html.erb +2 -2
  215. data/app/views/default_theme/{post.html.erb → single.html.erb} +1 -1
  216. data/app/views/default_theme/{post.rss.builder → single.rss.builder} +0 -0
  217. data/app/views/layouts/admin.html.erb +35 -133
  218. data/app/views/layouts/admin/_flash_messages.html.erb +1 -15
  219. data/app/views/layouts/admin/_footer.html.erb +6 -0
  220. data/app/views/layouts/admin/_header.html.erb +51 -0
  221. data/app/views/layouts/admin/_sidebar.html.erb +21 -30
  222. data/app/views/layouts/admin/installer.html.erb +2 -2
  223. data/app/views/layouts/login.html.erb +15 -33
  224. data/config/initializers/active_record_extension.rb +14 -2
  225. data/config/initializers/assets.rb +21 -7
  226. data/config/initializers/page_caching.rb +1 -2
  227. data/config/locales/admin/en.yml +17 -9
  228. data/config/locales/admin/es.yml +8 -3
  229. data/config/locales/admin/it.yml +4 -2
  230. data/config/locales/admin/js.yml +147 -0
  231. data/config/routes/admin.rb +4 -4
  232. data/config/routes/frontend.rb +2 -2
  233. data/config/system.json +1 -0
  234. data/db/migrate/20150926095310_rename_column_posts.rb +18 -0
  235. data/lib/camaleon_cms.rb +1 -1
  236. data/lib/camaleon_cms/engine.rb +17 -2
  237. data/lib/camaleon_cms/version.rb +1 -1
  238. data/lib/generators/camaleon_cms/gem_plugin_generator.rb +122 -0
  239. data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb +8 -0
  240. data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb +8 -0
  241. data/lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb +22 -0
  242. data/lib/generators/camaleon_cms/gem_plugin_template/app/models/plugins/my_plugin/my_plugin.rb +12 -0
  243. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb +2 -0
  244. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/front/index.html.erb +2 -0
  245. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/layouts/readme.txt +2 -0
  246. data/lib/generators/camaleon_cms/gem_plugin_template/config/camaleon_plugin.json +21 -0
  247. data/lib/generators/camaleon_cms/install_generator.rb +1 -2
  248. data/lib/generators/camaleon_cms/install_template/plugin_routes.rb +1 -10
  249. data/lib/generators/ctheme_template/app/apps/themes/my_theme/config/config.json +5 -5
  250. data/lib/generators/ctheme_template/app/apps/themes/my_theme/main_helper.rb +6 -5
  251. data/lib/generators/ctheme_template/app/apps/themes/my_theme/views/layouts/index.html.erb +2 -2
  252. data/lib/plugin_routes.rb +40 -2
  253. metadata +257 -22
  254. data/app/assets/stylesheets/admin/animate/animate.min.css +0 -6
  255. data/app/assets/stylesheets/admin/bootstrap/bootstrap-datetimepicker.css.scss +0 -339
  256. data/app/assets/stylesheets/admin/bootstrap/bootstrap.min.css +0 -5
  257. data/app/assets/stylesheets/admin/core.scss +0 -349
  258. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.eot +0 -0
  259. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.svg +0 -1831
  260. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.ttf +0 -0
  261. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.woff +0 -0
  262. data/app/assets/stylesheets/admin/nav-menu.css +0 -54
  263. data/app/assets/stylesheets/admin/theme-default.scss +0 -8462
  264. data/app/models/concerns/site_public.rb +0 -23
  265. data/app/views/admin/appearances/menu.html.erb +0 -199
  266. data/lib/Gemfile +0 -25
@@ -1,121 +1,106 @@
1
- <div class="page-title">
2
- <h2><span class="fa fa-file-o"></span> <%= t('admin.page_title.list') %> <%= @post_type.the_title.pluralize %></h2>
3
- </div>
4
-
5
- <!-- PAGE CONTENT WRAPPER -->
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_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
- <%= render partial: "admin/posts/filter_posts" %>
10
+ <%= render partial: "admin/posts/filter_posts" %>
22
11
  </div>
23
12
  <div class="col-md-3">
24
- <form action="<%= url_for(action: :index) %>" method="get">
25
- <div class="input-group">
26
- <input type="text" class="form-control" name="q" value="<%= params[:q] %>">
27
- <span class="input-group-btn"><button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button></span>
28
- </div>
29
- </form>
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
- <th><%= t('admin.table.id')%></th>
38
- <th><%= t('admin.table.title')%></th>
39
- <th><%= t('admin.table.status')%></th>
40
- <th><%= t('admin.table.author')%></th>
41
- <% if @post_type.manage_categories? %>
42
- <th><%= t('admin.table.categories')%></th>
43
- <% end %>
44
- <% if @post_type.manage_tags? %>
45
- <th><%= t('admin.table.tags')%></th>
46
- <% end %>
47
- <% extra_column = {post_type: @post_type, content: "", from_body: false}; hooks_run("list_post_extra_columns", extra_column) %>
48
- <%= raw extra_column[:content] %>
49
- <th><%= t("updated_at") %></th>
50
- <th style="width: 98px; text-align: right"><%= t('admin.table.actions')%></th>
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| f = f.decorate %>
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
- <td><%= f.id %></td>
57
- <td>
58
- <% if !f.trash? && (can? :update, f) %>
59
- <%= link_to f.the_title, {action: :edit, id: f.id }, class: "" %>
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
- <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>
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
- </td>
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
- </table>
113
- <%= content_tag("div", raw(t('admin.message.data_found_list')), class: "alert alert-warning") if @posts.empty? %>
114
- <%= will_paginate @posts, renderer: BootstrapPagination::Rails if @posts.present? %>
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
- </div>
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-info btn-block"><%= t('admin.button.enter') %></button>
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
- <div class="login-title"><%= raw t('admin.login.reset_password_html')%> </div>
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-info btn-block"><%= t('admin.button.submit') %></button>
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")}&raquo;".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
- <div class="login-title"><%= raw t('admin.login.welcome_login_html') %> </div>
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="form-group">
23
- <div class="col-md-6">
24
- <a href="<%= admin_forgot_path %>" class="btn btn-link btn-block"><%= t('admin.login.forgot_your_password_int') %></a>
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
- <div class="col-md-6">
27
- <button class="btn btn-info btn-block"><%= t('admin.button.log_in') %></button>
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
- <% end %>
34
- <% if current_site.get_option('has_create_account', false) %>
35
- <div class="login-subtitle">
36
- <%= t('admin.login.do_not_have_account_yet') %> <a href="<%= admin_register_path %>"><%= t('admin.login.create_account') %></a>
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
- <div class="login-title"><%= raw t('admin.login.msg_registration_html') %></div>
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>
@@ -50,7 +50,7 @@
50
50
 
51
51
 
52
52
  <script>
53
- run.push(function(){
53
+ jQuery(function($){
54
54
  var values = <%= raw(values.to_json) %>;
55
55
  var multiple = true;
56
56
  var $content = $("#content-field-<%= @rand %>");
@@ -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.get_field_values(@field.slug)
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
- <div class="list-fields">
58
- <ul id="sortable-<%= @rand %>" >
51
+ <ul id="sortable-<%= @rand %>" >
59
52
 
60
- </ul>
61
- </div>
53
+ </ul>
62
54
  <% if @field.options[:multiple].to_s.to_bool %>
63
- <div style="padding: 10px 0 0">
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
- <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 %>"/>
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
- <input type="text" name="<%= @field_name %>[<%= @field.slug %>][values][][value]" placeholder="<%= t('admin.table.value') %>" class="form-control input-value"/>
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][]" style="width: auto" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>">
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][]" style="width: auto" class="form-control input-value <%= "required" if @field.options[:required].to_s.to_bool %>">
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 %>