adminpanel 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -2
- data/.ruby-version +1 -0
- data/.travis.yml +8 -8
- data/Gemfile +26 -24
- data/README.md +57 -57
- data/adminpanel.gemspec +41 -39
- data/app/assets/fonts/fontawesome-webfont.svg +254 -254
- data/app/assets/javascripts/adminpanel/bootstrap-datepicker.js +1159 -1159
- data/app/assets/javascripts/adminpanel/bootstrap-timepicker.js +803 -803
- data/app/assets/javascripts/adminpanel/bootstrap.js +2170 -2170
- data/app/assets/javascripts/adminpanel/{products.js → images_form.js} +13 -13
- data/app/assets/javascripts/adminpanel/imagesloaded.js +12 -12
- data/app/assets/javascripts/adminpanel/jquery.dataTables.min.js +155 -155
- data/app/assets/javascripts/adminpanel/jquery.facybox.js +395 -395
- data/app/assets/javascripts/adminpanel/jquery.masonry.min.js +9 -9
- data/app/assets/javascripts/adminpanel/jquery.slimscroll.min.js +13 -13
- data/app/assets/javascripts/adminpanel/medium-editor.js +702 -702
- data/app/assets/javascripts/adminpanel/realm.js +87 -87
- data/app/assets/javascripts/adminpanel/tables.js +126 -126
- data/app/assets/javascripts/application-admin.js +15 -15
- data/app/assets/stylesheets/adminpanel/_clearfix.css.scss +7 -7
- data/app/assets/stylesheets/adminpanel/alertify.css +241 -241
- data/app/assets/stylesheets/adminpanel/bootstrap.css +6103 -6103
- data/app/assets/stylesheets/adminpanel/colorpicker.css +6 -6
- data/app/assets/stylesheets/adminpanel/datepicker.css +9 -9
- data/app/assets/stylesheets/adminpanel/elfinder.min.css +59 -59
- data/app/assets/stylesheets/adminpanel/facybox.css +146 -146
- data/app/assets/stylesheets/adminpanel/font-awesome.min.css +33 -33
- data/app/assets/stylesheets/adminpanel/fullcalendar.css +618 -618
- data/app/assets/stylesheets/adminpanel/fullcalendar.print.css +61 -61
- data/app/assets/stylesheets/adminpanel/select2.css +524 -524
- data/app/assets/stylesheets/adminpanel/theme.css +1571 -1571
- data/app/assets/stylesheets/adminpanel/timepicker.css +82 -82
- data/app/assets/stylesheets/application-admin.css +13 -13
- data/app/controllers/adminpanel/application_controller.rb +32 -17
- data/app/controllers/adminpanel/galleries_controller.rb +80 -80
- data/app/controllers/adminpanel/sections_controller.rb +45 -45
- data/app/controllers/adminpanel/sessions_controller.rb +26 -26
- data/app/controllers/adminpanel/users_controller.rb +84 -84
- data/app/helpers/adminpanel/application_helper.rb +41 -51
- data/app/helpers/adminpanel/breadcrumbs_helper.rb +16 -0
- data/app/helpers/adminpanel/custom_form_builder.rb +248 -0
- data/app/helpers/adminpanel/images_helper.rb +9 -9
- data/app/helpers/adminpanel/rest_actions_helper.rb +47 -0
- data/app/helpers/adminpanel/router_helper.rb +33 -0
- data/app/helpers/adminpanel/sessions_helper.rb +25 -25
- data/app/models/adminpanel/gallery.rb +60 -60
- data/app/models/adminpanel/image.rb +14 -14
- data/app/models/adminpanel/section.rb +22 -22
- data/app/models/adminpanel/user.rb +35 -35
- data/app/uploaders/adminpanel/gallery_uploader.rb +55 -55
- data/app/uploaders/adminpanel/image_uploader.rb +57 -57
- data/app/views/adminpanel/galleries/_galleries_table.html.erb +14 -14
- data/app/views/adminpanel/galleries/create.html.erb +2 -2
- data/app/views/adminpanel/galleries/delete.html.erb +2 -2
- data/app/views/adminpanel/galleries/edit.html.erb +25 -25
- data/app/views/adminpanel/galleries/index.html.erb +51 -51
- data/app/views/adminpanel/galleries/new.html.erb +17 -17
- data/app/views/adminpanel/galleries/show.html.erb +17 -17
- data/app/views/adminpanel/galleries/update.html.erb +2 -2
- data/app/views/adminpanel/sections/_image_fields.html.erb +23 -23
- data/app/views/adminpanel/sections/_sections_table.html.erb +16 -16
- data/app/views/adminpanel/sections/create.html.erb +2 -2
- data/app/views/adminpanel/sections/destroy.html.erb +2 -2
- data/app/views/adminpanel/sections/edit.html.erb +41 -41
- data/app/views/adminpanel/sections/index.html.erb +44 -44
- data/app/views/adminpanel/sections/new.html.erb +26 -26
- data/app/views/adminpanel/sections/show.html.erb +30 -30
- data/app/views/adminpanel/sections/update.html.erb +2 -2
- data/app/views/adminpanel/sessions/new.html.erb +25 -25
- data/app/views/adminpanel/users/_user_form.html.erb +20 -20
- data/app/views/adminpanel/users/edit.html.erb +5 -5
- data/app/views/adminpanel/users/index.html.erb +49 -49
- data/app/views/adminpanel/users/new.html.erb +5 -5
- data/app/views/adminpanel/users/show.html.erb +20 -20
- data/app/views/layouts/_shim.html.erb +3 -3
- data/app/views/layouts/_side_menu.html.erb +49 -43
- data/app/views/layouts/_top_bar.html.erb +43 -43
- data/app/views/layouts/admin-login.html.erb +28 -28
- data/app/views/layouts/admin.html.erb +41 -39
- data/app/views/shared/_breadcrumb.html.erb +6 -6
- data/app/views/shared/_error_messages.html.erb +16 -16
- data/app/views/shared/_form_fields.html.erb +25 -0
- data/app/views/{adminpanel/products → shared}/_image_fields.html.erb +23 -23
- data/app/views/shared/_init_editor.html.erb +24 -0
- data/app/views/shared/edit.html.erb +28 -0
- data/app/views/shared/index.html.erb +94 -0
- data/app/views/shared/new.html.erb +28 -0
- data/app/views/shared/show.html.erb +63 -0
- data/config/locales/en.yml +5 -5
- data/config/locales/es.yml +127 -129
- data/config/routes.rb +24 -16
- data/lib/adminpanel.rb +9 -7
- data/lib/adminpanel/active_record_extension.rb +38 -0
- data/lib/adminpanel/engine.rb +5 -5
- data/lib/adminpanel/version.rb +3 -3
- data/lib/generators/adminpanel/initialize/initialize_generator.rb +17 -0
- data/lib/generators/adminpanel/{install/templates/migrations → initialize/templates}/create_adminpanel_tables.rb +45 -64
- data/lib/generators/adminpanel/resource/resource_generator.rb +105 -0
- data/lib/generators/adminpanel/resource/templates/controller.rb +4 -0
- data/lib/generators/adminpanel/resource/templates/migration.rb +9 -0
- data/lib/generators/adminpanel/resource/templates/resource.rb +19 -0
- data/spec/dummy/.gitignore +17 -17
- data/spec/dummy/README.rdoc +261 -261
- data/spec/dummy/Rakefile +7 -7
- data/{app/views/adminpanel/categories/show.html.erb → spec/dummy/app/adminpanel/products.rb} +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -13
- data/spec/dummy/app/assets/stylesheets/application.css +13 -13
- data/spec/dummy/app/controllers/adminpanel/.gitkeep +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -11
- data/spec/dummy/app/helpers/application_helper.rb +2 -2
- data/spec/dummy/app/views/layouts/application.html.erb +14 -14
- data/spec/dummy/config.ru +4 -4
- data/spec/dummy/config/application.rb +62 -62
- data/spec/dummy/config/boot.rb +9 -9
- data/spec/dummy/config/carrierwve.rb +5 -5
- data/spec/dummy/config/database.yml +24 -24
- data/spec/dummy/config/environment.rb +5 -5
- data/spec/dummy/config/environments/development.rb +41 -41
- data/spec/dummy/config/environments/production.rb +72 -72
- data/spec/dummy/config/environments/test.rb +41 -41
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
- data/spec/dummy/config/initializers/inflections.rb +15 -15
- data/spec/dummy/config/initializers/mime_types.rb +5 -5
- data/spec/dummy/config/initializers/secret_token.rb +8 -8
- data/spec/dummy/config/initializers/session_store.rb +8 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
- data/spec/dummy/config/locales/en.yml +5 -5
- data/spec/dummy/config/routes.rb +4 -4
- data/spec/dummy/db/schema.rb +15 -15
- data/spec/dummy/public/404.html +26 -26
- data/spec/dummy/public/422.html +26 -26
- data/spec/dummy/public/500.html +25 -25
- data/spec/dummy/public/uploads/gallery/file/1/hipster.jpg +0 -0
- data/spec/dummy/public/uploads/gallery/file/1/thumb_hipster.jpg +0 -0
- data/spec/dummy/script/rails +6 -6
- data/spec/features/authentication_pages_spec.rb +43 -43
- data/spec/features/galleries_pages_spec.rb +124 -124
- data/spec/features/section_pages_spec.rb +37 -37
- data/spec/features/user_pages_spec.rb +48 -48
- data/spec/generators/initialize_spec.rb +9 -0
- data/spec/generators/resource_spec.rb +122 -0
- data/spec/models/gallery_spec.rb +21 -21
- data/spec/models/section_spec.rb +66 -66
- data/spec/models/user_spec.rb +105 -105
- data/spec/spec_helper.rb +32 -31
- data/spec/support/define_factory_models.rb +25 -36
- data/spec/support/helper_methods.rb +26 -26
- data/spec/support/submit_forms_without_button.rb +16 -16
- data/spec/support/test_database.rb +45 -58
- data/spec/uploaders/gallery_uploader_spec.rb +36 -30
- data/spec/uploaders/image_uploader_spec.rb +30 -29
- metadata +208 -64
- checksums.yaml +0 -7
- data/app/assets/javascripts/adminpanel/init_editor.js +0 -28
- data/app/controllers/adminpanel/categories_controller.rb +0 -41
- data/app/controllers/adminpanel/products_controller.rb +0 -88
- data/app/helpers/custom_form_builder.rb +0 -219
- data/app/models/adminpanel/category.rb +0 -7
- data/app/models/adminpanel/product.rb +0 -24
- data/app/views/adminpanel/categories/edit.html.erb +0 -18
- data/app/views/adminpanel/categories/index.html.erb +0 -55
- data/app/views/adminpanel/categories/new.html.erb +0 -18
- data/app/views/adminpanel/products/.DS_Store +0 -0
- data/app/views/adminpanel/products/_product_form.html.erb +0 -31
- data/app/views/adminpanel/products/edit.html.erb +0 -10
- data/app/views/adminpanel/products/index.html.erb +0 -51
- data/app/views/adminpanel/products/new.html.erb +0 -10
- data/app/views/adminpanel/products/show.html.erb +0 -61
- data/config/database.yml +0 -24
- data/lib/generators/adminpanel/install/install_generator.rb +0 -12
- data/spec/features/categories_pages_spec.rb +0 -44
- data/spec/features/product_pages_spec.rb +0 -64
- data/spec/models/category_spec.rb +0 -58
- data/spec/models/product_spec.rb +0 -51
@@ -1,6 +1,6 @@
|
|
1
|
-
<% provide(:page_title, t("user.new")) %>
|
2
|
-
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
-
|
4
|
-
<div class="row-fluid">
|
5
|
-
<%= render 'user_form' %>
|
1
|
+
<% provide(:page_title, t("user.new")) %>
|
2
|
+
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
+
|
4
|
+
<div class="row-fluid">
|
5
|
+
<%= render 'user_form' %>
|
6
6
|
</div>
|
@@ -1,21 +1,21 @@
|
|
1
|
-
<% provide(:page_title, @user.name.humanize) %>
|
2
|
-
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
-
|
4
|
-
<div class="row-fluid">
|
5
|
-
<div class="widget widget-padding span12">
|
6
|
-
<div class="widget-header">
|
7
|
-
<i class="icon-user"></i>
|
8
|
-
<h5><%= @user.name.humanize %>
|
9
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_user_path(@user), :title => "Editar Usuario" %>
|
10
|
-
</h5>
|
11
|
-
</div>
|
12
|
-
<div class="widget-body row-fluid">
|
13
|
-
<div class="span1">
|
14
|
-
<b>Correo Electrónico</b>
|
15
|
-
</div>
|
16
|
-
<div class="span11">
|
17
|
-
<%= @user.email %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
1
|
+
<% provide(:page_title, @user.name.humanize) %>
|
2
|
+
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
+
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="widget widget-padding span12">
|
6
|
+
<div class="widget-header">
|
7
|
+
<i class="icon-user"></i>
|
8
|
+
<h5><%= @user.name.humanize %>
|
9
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_user_path(@user), :title => "Editar Usuario" %>
|
10
|
+
</h5>
|
11
|
+
</div>
|
12
|
+
<div class="widget-body row-fluid">
|
13
|
+
<div class="span1">
|
14
|
+
<b>Correo Electrónico</b>
|
15
|
+
</div>
|
16
|
+
<div class="span11">
|
17
|
+
<%= @user.email %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
21
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
2
|
-
<!--[if lt IE 9]>
|
3
|
-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
1
|
+
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
2
|
+
<!--[if lt IE 9]>
|
3
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
4
4
|
<![endif]-->
|
@@ -1,44 +1,50 @@
|
|
1
|
-
<!-- Side menu -->
|
2
|
-
<div class="sidebar-nav nav-collapse collapse">
|
3
|
-
<% if signed_in? %>
|
4
|
-
<div class="user_side clearfix">
|
5
|
-
<h5>
|
6
|
-
<%= @current_user.name.humanize %>
|
7
|
-
</h5>
|
8
|
-
<%= link_to (content_tag(:i, nil, :class => 'icon-cog') + ' Editar'), edit_user_path(@current_user) %>
|
9
|
-
</div>
|
10
|
-
<% end %>
|
11
|
-
<div class="accordion" id="accordion2">
|
12
|
-
|
13
|
-
<div class="accordion-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<div class="accordion-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<div class="accordion-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<div class="accordion-group">
|
32
|
-
<div class="accordion-heading">
|
33
|
-
<%=
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
1
|
+
<!-- Side menu -->
|
2
|
+
<div class="sidebar-nav nav-collapse collapse">
|
3
|
+
<% if signed_in? %>
|
4
|
+
<div class="user_side clearfix">
|
5
|
+
<h5>
|
6
|
+
<%= @current_user.name.humanize %>
|
7
|
+
</h5>
|
8
|
+
<%= link_to (content_tag(:i, nil, :class => 'icon-cog') + ' Editar'), edit_user_path(@current_user) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
<div class="accordion" id="accordion2">
|
12
|
+
<div class="accordion-group">
|
13
|
+
<div class="accordion-heading">
|
14
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-user') + content_tag(:span, ' Usuarios'), users_path, :class => "accordion-toggle b_9FDDF6 #{is_current_section?('users')}" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="accordion-group">
|
19
|
+
<div class="accordion-heading">
|
20
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-picture') + content_tag(:span, " #{t("model.Adminpanel::Gallery")}"), galleries_path, :class => "accordion-toggle b_C3F7A7 #{is_current_section?('galleries')}" %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="accordion-group">
|
25
|
+
<div class="accordion-heading">
|
26
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-tasks') + content_tag(:span, ' Secciones'), sections_path, :class => "accordion-toggle b_F6F1A2 #{is_current_section?('sections')}" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<% @menu_items.each do |menu| %>
|
31
|
+
<div class="accordion-group">
|
32
|
+
<div class="accordion-heading">
|
33
|
+
<%=
|
34
|
+
link_to content_tag(
|
35
|
+
:i,
|
36
|
+
nil,
|
37
|
+
:class => "Adminpanel::#{menu}".constantize.icon
|
38
|
+
) + content_tag(
|
39
|
+
:span,
|
40
|
+
" " + ("Adminpanel::#{menu}".constantize.display_name)
|
41
|
+
),
|
42
|
+
eval("#{menu.tableize}_path"),
|
43
|
+
:class => "accordion-toggle b_F6F1A2 #{is_current_section?(menu.tableize)}"
|
44
|
+
%>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
48
|
+
</div>
|
49
|
+
</div>
|
44
50
|
<!-- /Side menu -->
|
@@ -1,44 +1,44 @@
|
|
1
|
-
<div class="navbar navbar-fixed-top">
|
2
|
-
<div class="navbar-inner">
|
3
|
-
<div class="container-fluid">
|
4
|
-
<div class="logo">
|
5
|
-
<%= link_to image_tag("logo.png", :alt => "PCP del Sureste"), root_path %>
|
6
|
-
</div>
|
7
|
-
<% if signed_in? %>
|
8
|
-
<a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
|
9
|
-
<span class="icon-bar"></span>
|
10
|
-
<span class="icon-bar"></span>
|
11
|
-
<span class="icon-bar"></span>
|
12
|
-
</a>
|
13
|
-
<a class="btn btn-navbar slide_menu_left visible-tablet">
|
14
|
-
<span class="icon-bar"></span>
|
15
|
-
<span class="icon-bar"></span>
|
16
|
-
<span class="icon-bar"></span>
|
17
|
-
</a>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<div class="top-menu visible-desktop">
|
21
|
-
<ul class="pull-right">
|
22
|
-
<li>
|
23
|
-
<% if signed_in? %>
|
24
|
-
<%= link_to content_tag('i', nil, :class => 'icon-off') + ' Logout', signout_path, :method => "delete", :escape => true %>
|
25
|
-
<% else %>
|
26
|
-
<%= link_to content_tag('i', nil, :class => 'icon-off') + ' Login', signin_path, :escape => true %>
|
27
|
-
<% end %>
|
28
|
-
</li>
|
29
|
-
</ul>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class="top-menu visible-phone visible-tablet">
|
33
|
-
<ul class="pull-right">
|
34
|
-
<li>
|
35
|
-
<% if signed_in? %>
|
36
|
-
<%= link_to content_tag('i', nil, :class => 'icon-off'), signout_path, :method => "delete", :title => 'Logout', :id => "signout-button" %>
|
37
|
-
</li>
|
38
|
-
</ul>
|
39
|
-
</div>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
</div>
|
43
|
-
</div>
|
1
|
+
<div class="navbar navbar-fixed-top">
|
2
|
+
<div class="navbar-inner">
|
3
|
+
<div class="container-fluid">
|
4
|
+
<div class="logo">
|
5
|
+
<%= link_to image_tag("logo.png", :alt => "PCP del Sureste"), root_path %>
|
6
|
+
</div>
|
7
|
+
<% if signed_in? %>
|
8
|
+
<a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
|
9
|
+
<span class="icon-bar"></span>
|
10
|
+
<span class="icon-bar"></span>
|
11
|
+
<span class="icon-bar"></span>
|
12
|
+
</a>
|
13
|
+
<a class="btn btn-navbar slide_menu_left visible-tablet">
|
14
|
+
<span class="icon-bar"></span>
|
15
|
+
<span class="icon-bar"></span>
|
16
|
+
<span class="icon-bar"></span>
|
17
|
+
</a>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<div class="top-menu visible-desktop">
|
21
|
+
<ul class="pull-right">
|
22
|
+
<li>
|
23
|
+
<% if signed_in? %>
|
24
|
+
<%= link_to content_tag('i', nil, :class => 'icon-off') + ' Logout', signout_path, :method => "delete", :escape => true %>
|
25
|
+
<% else %>
|
26
|
+
<%= link_to content_tag('i', nil, :class => 'icon-off') + ' Login', signin_path, :escape => true %>
|
27
|
+
<% end %>
|
28
|
+
</li>
|
29
|
+
</ul>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="top-menu visible-phone visible-tablet">
|
33
|
+
<ul class="pull-right">
|
34
|
+
<li>
|
35
|
+
<% if signed_in? %>
|
36
|
+
<%= link_to content_tag('i', nil, :class => 'icon-off'), signout_path, :method => "delete", :title => 'Logout', :id => "signout-button" %>
|
37
|
+
</li>
|
38
|
+
</ul>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
</div>
|
44
44
|
</div>
|
@@ -1,28 +1,28 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title><%= full_title(yield(:page_title)) %></title>
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
<meta name="author" content="Bluth Company">
|
8
|
-
<%= stylesheet_link_tag "application-admin", :media => "all" %>
|
9
|
-
<%= javascript_include_tag "application-admin" %>
|
10
|
-
<%= csrf_meta_tags %>
|
11
|
-
<link rel="shortcut icon" href="favicon.ico">
|
12
|
-
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
13
|
-
<link rel="Favicon Icon" href="favicon.ico">
|
14
|
-
<%= render 'layouts/shim' %>
|
15
|
-
</head>
|
16
|
-
|
17
|
-
<body>
|
18
|
-
<div id="wrap">
|
19
|
-
<%= render 'layouts/top_bar' %>
|
20
|
-
<div class="container-fluid">
|
21
|
-
<%= yield %>
|
22
|
-
<%= debug(params) if Rails.env.development? %>
|
23
|
-
</div>
|
24
|
-
<!--/.fluid-container-->
|
25
|
-
</div>
|
26
|
-
<!-- wrap ends-->
|
27
|
-
</body>
|
28
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%= full_title(yield(:page_title)) %></title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="author" content="Bluth Company">
|
8
|
+
<%= stylesheet_link_tag "application-admin", :media => "all" %>
|
9
|
+
<%= javascript_include_tag "application-admin" %>
|
10
|
+
<%= csrf_meta_tags %>
|
11
|
+
<link rel="shortcut icon" href="favicon.ico">
|
12
|
+
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
13
|
+
<link rel="Favicon Icon" href="favicon.ico">
|
14
|
+
<%= render 'layouts/shim' %>
|
15
|
+
</head>
|
16
|
+
|
17
|
+
<body>
|
18
|
+
<div id="wrap">
|
19
|
+
<%= render 'layouts/top_bar' %>
|
20
|
+
<div class="container-fluid">
|
21
|
+
<%= yield %>
|
22
|
+
<%= debug(params) if Rails.env.development? %>
|
23
|
+
</div>
|
24
|
+
<!--/.fluid-container-->
|
25
|
+
</div>
|
26
|
+
<!-- wrap ends-->
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -1,39 +1,41 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title><%= full_title(yield(:page_title)) %></title>
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
<%= stylesheet_link_tag "application-admin", :media => "all" %>
|
8
|
-
<%= javascript_include_tag "application-admin" %>
|
9
|
-
<%= csrf_meta_tags %>
|
10
|
-
<%= favicon_link_tag "favicon.ico" %>
|
11
|
-
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
12
|
-
|
13
|
-
<%= render 'layouts/shim' %>
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
<div id="wrap">
|
18
|
-
<%= render 'layouts/top_bar' %>
|
19
|
-
<div class="container-fluid">
|
20
|
-
<%= render 'layouts/side_menu' %>
|
21
|
-
<!-- Main window -->
|
22
|
-
<div class="main_container" id="dashboard_page">
|
23
|
-
<div class = "row-fluid">
|
24
|
-
<%= render_breadcrumb '/' %>
|
25
|
-
<h2 class = "heading"><%= yield(:page_title) %></h2>
|
26
|
-
</div>
|
27
|
-
<% flash.each do |key, value| %>
|
28
|
-
<div class = "alert alert-<%= key %>"><%= value %></div>
|
29
|
-
<% end %>
|
30
|
-
<%= yield %>
|
31
|
-
<%= debug(params) if Rails.env.development? %>
|
32
|
-
</div>
|
33
|
-
<!-- /Main window -->
|
34
|
-
</div>
|
35
|
-
<!--/.fluid-container-->
|
36
|
-
</div>
|
37
|
-
<!-- wrap ends-->
|
38
|
-
|
39
|
-
</
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%= full_title(yield(:page_title)) %></title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<%= stylesheet_link_tag "application-admin", :media => "all" %>
|
8
|
+
<%= javascript_include_tag "application-admin" %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= favicon_link_tag "favicon.ico" %>
|
11
|
+
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
|
12
|
+
|
13
|
+
<%= render 'layouts/shim' %>
|
14
|
+
</head>
|
15
|
+
|
16
|
+
<body>
|
17
|
+
<div id="wrap">
|
18
|
+
<%= render 'layouts/top_bar' %>
|
19
|
+
<div class="container-fluid">
|
20
|
+
<%= render 'layouts/side_menu' %>
|
21
|
+
<!-- Main window -->
|
22
|
+
<div class="main_container" id="dashboard_page">
|
23
|
+
<div class = "row-fluid">
|
24
|
+
<%= render_breadcrumb '/' %>
|
25
|
+
<h2 class = "heading"><%= yield(:page_title) %></h2>
|
26
|
+
</div>
|
27
|
+
<% flash.each do |key, value| %>
|
28
|
+
<div class = "alert alert-<%= key %>"><%= value %></div>
|
29
|
+
<% end %>
|
30
|
+
<%= yield %>
|
31
|
+
<%= debug(params) if Rails.env.development? %>
|
32
|
+
</div>
|
33
|
+
<!-- /Main window -->
|
34
|
+
</div>
|
35
|
+
<!--/.fluid-container-->
|
36
|
+
</div>
|
37
|
+
<!-- wrap ends-->
|
38
|
+
<%= yield :scripts %>
|
39
|
+
</body>
|
40
|
+
|
41
|
+
</html>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<ul class="breadcrumb">
|
2
|
-
<% nav.each do |nav| %>
|
3
|
-
<li><%= link_to nav[:title], nav[:url] %><span class="divider"><%= divider %></span></li>
|
4
|
-
<% end %>
|
5
|
-
<li class="active"><%= yield(:page_title) %></li>
|
6
|
-
</ul>
|
1
|
+
<ul class="breadcrumb">
|
2
|
+
<% nav.each do |nav| %>
|
3
|
+
<li><%= link_to nav[:title], nav[:url] %><span class="divider"><%= divider %></span></li>
|
4
|
+
<% end %>
|
5
|
+
<li class="active"><%= yield(:page_title) %></li>
|
6
|
+
</ul>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<% if object.errors.any? %>
|
2
|
-
<div id="error_explanation">
|
3
|
-
<div id="alerts" class="alert alert-error">
|
4
|
-
<%= t( :errors, :count => object.errors.count, :model => t("model.#{object.class.model_name}")) %>:
|
5
|
-
<ul>
|
6
|
-
<% object.errors.messages.keys.each do |field| %>
|
7
|
-
<% object.errors.messages[field].each do |value| %>
|
8
|
-
<li>
|
9
|
-
<%= t("model.attributes.#{object.class.model_name}.#{field}") %>
|
10
|
-
<%= value %>
|
11
|
-
</li>
|
12
|
-
<% end %>
|
13
|
-
<% end %>
|
14
|
-
</ul>
|
15
|
-
</div>
|
16
|
-
</div>
|
1
|
+
<% if object.errors.any? %>
|
2
|
+
<div id="error_explanation">
|
3
|
+
<div id="alerts" class="alert alert-error">
|
4
|
+
<%= t( :errors, :count => object.errors.count, :model => t("model.#{object.class.model_name}")) %>:
|
5
|
+
<ul>
|
6
|
+
<% object.errors.messages.keys.each do |field| %>
|
7
|
+
<% object.errors.messages[field].each do |value| %>
|
8
|
+
<li>
|
9
|
+
<%= t("model.attributes.#{object.class.model_name}.#{field}") %>
|
10
|
+
<%= value %>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
17
|
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% @model.form_attributes.each do |entries| %>
|
2
|
+
<% entries.each do |attribute, properties| %>
|
3
|
+
<% if properties["type"] != "adminpanel_file_field" &&
|
4
|
+
properties["type"] != "wysiwyg_field" %>
|
5
|
+
<% type = properties["type"] %>
|
6
|
+
<% args = properties.except("type", "name") %>
|
7
|
+
<%= f.send(type, attribute, args) %>
|
8
|
+
<% elsif properties["type"] == "adminpanel_file_field" %>
|
9
|
+
<%= f.fields_for :images do |builder| %>
|
10
|
+
<%= render 'shared/image_fields', :f => builder, :model_name => @model.display_name.capitalize %>
|
11
|
+
<% end -%>
|
12
|
+
<%= link_to_add_fields t("Add Image"), f, :images, @model.display_name.capitalize %>
|
13
|
+
<% else %>
|
14
|
+
<% type = properties["type"] %>
|
15
|
+
<% args = properties.except("type", "name") %>
|
16
|
+
<%= f.hidden_field attribute, :id => "#{attribute}-field", :value => "" %>
|
17
|
+
<%= f.send(type, attribute, args) %>
|
18
|
+
<%= content_for :scripts do %>
|
19
|
+
<script type="text/javascript">
|
20
|
+
<%= render "shared/init_editor", :field_var => attribute, :label => properties[:label] %>
|
21
|
+
</script>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|