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,2 +1,2 @@
|
|
1
|
-
<h1>Admin::Sections#create</h1>
|
2
|
-
<p>Find me in app/views/admin/sections/create.html.erb</p>
|
1
|
+
<h1>Admin::Sections#create</h1>
|
2
|
+
<p>Find me in app/views/admin/sections/create.html.erb</p>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<h1>Admin::Sections#destroy</h1>
|
2
|
-
<p>Find me in app/views/admin/sections/destroy.html.erb</p>
|
1
|
+
<h1>Admin::Sections#destroy</h1>
|
2
|
+
<p>Find me in app/views/admin/sections/destroy.html.erb</p>
|
@@ -1,42 +1,42 @@
|
|
1
|
-
<% provide(:page_title, t("section.edit")) %>
|
2
|
-
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
-
<% breadcrumb_add(@section.name, section_path(@section)) %>
|
4
|
-
<div class="row-fluid">
|
5
|
-
<div class = "widget widget-padding span12">
|
6
|
-
<div class = "widget-header"><i class = "icon-tasks"></i><h5><%= @section.name %></h5></div>
|
7
|
-
<div class = "widget-body">
|
8
|
-
<div class = "widget-forms clearfix">
|
9
|
-
<%= custom_form_for(@section, :url => section_path(@section)) do |f| %>
|
10
|
-
<%= render 'shared/error_messages', :object => @section %>
|
11
|
-
|
12
|
-
<% if @section.has_description %>
|
13
|
-
<div class="control-group">
|
14
|
-
<label class="control-label"><%= t("model.attributes.Adminpanel::Section.description") %></label>
|
15
|
-
<div class="controls">
|
16
|
-
<%= f.hidden_field :description, :id => "description-field" %>
|
17
|
-
<% if @section.description.nil? %>
|
18
|
-
<%= content_tag(:div, @section.description, :class => "editable", "data-placeholder" => t("Write description here")) %>
|
19
|
-
<% else %>
|
20
|
-
<%= content_tag(:div, @section.description.html_safe, :class => "editable", "data-placeholder" => t("Write description here")) %>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<% else %>
|
25
|
-
<%= f.text_field :description, :label => t("model.attributes.Adminpanel::Section.description") %>
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<% if @section.has_image %>
|
29
|
-
<%= f.fields_for :images do |builder| %>
|
30
|
-
<%= render 'image_fields', :f => builder, :model_name => @section.simple_name %>
|
31
|
-
<% end -%>
|
32
|
-
|
33
|
-
<%= link_to_add_fields "Agregar Imagen", f, :images, @section.simple_name %>
|
34
|
-
<% end %>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
<div class = "widget-footer">
|
38
|
-
<%= f.submit t("action.save"), :disable_with => t("action.
|
39
|
-
</div>
|
40
|
-
<% end -%>
|
41
|
-
</div>
|
1
|
+
<% provide(:page_title, t("section.edit")) %>
|
2
|
+
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
+
<% breadcrumb_add(@section.name, section_path(@section)) %>
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class = "widget widget-padding span12">
|
6
|
+
<div class = "widget-header"><i class = "icon-tasks"></i><h5><%= @section.name %></h5></div>
|
7
|
+
<div class = "widget-body">
|
8
|
+
<div class = "widget-forms clearfix">
|
9
|
+
<%= custom_form_for(@section, :url => section_path(@section)) do |f| %>
|
10
|
+
<%= render 'shared/error_messages', :object => @section %>
|
11
|
+
|
12
|
+
<% if @section.has_description %>
|
13
|
+
<div class="control-group">
|
14
|
+
<label class="control-label"><%= t("model.attributes.Adminpanel::Section.description") %></label>
|
15
|
+
<div class="controls">
|
16
|
+
<%= f.hidden_field :description, :id => "description-field" %>
|
17
|
+
<% if @section.description.nil? %>
|
18
|
+
<%= content_tag(:div, @section.description, :class => "editable", "data-placeholder" => t("Write description here")) %>
|
19
|
+
<% else %>
|
20
|
+
<%= content_tag(:div, @section.description.html_safe, :class => "editable", "data-placeholder" => t("Write description here")) %>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<% else %>
|
25
|
+
<%= f.text_field :description, :label => t("model.attributes.Adminpanel::Section.description") %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% if @section.has_image %>
|
29
|
+
<%= f.fields_for :images do |builder| %>
|
30
|
+
<%= render 'image_fields', :f => builder, :model_name => @section.simple_name %>
|
31
|
+
<% end -%>
|
32
|
+
|
33
|
+
<%= link_to_add_fields "Agregar Imagen", f, :images, @section.simple_name %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<div class = "widget-footer">
|
38
|
+
<%= f.submit t("action.save"), :disable_with => t("action.submitting"), :id => "save-button" %>
|
39
|
+
</div>
|
40
|
+
<% end -%>
|
41
|
+
</div>
|
42
42
|
</div>
|
@@ -1,44 +1,44 @@
|
|
1
|
-
<%= provide(:page_title, "Secciones") %>
|
2
|
-
|
3
|
-
<div class="row-fluid">
|
4
|
-
<div class="widget widget-padding span12" id="wizard">
|
5
|
-
<div class="widget-header">
|
6
|
-
<ul class="nav nav-tabs">
|
7
|
-
<% current_page = "no-page" %>
|
8
|
-
<% @sections.each_with_index do |section, index| %>
|
9
|
-
<% if current_page != section.page %>
|
10
|
-
<% if index == 0 %>
|
11
|
-
<li class = "active">
|
12
|
-
<% else %>
|
13
|
-
<li>
|
14
|
-
<% end %>
|
15
|
-
<%= link_to (section.page.capitalize), "#tab#{index}", "data-toggle" => "tab" %></li>
|
16
|
-
<% current_page = section.page %>
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
</ul>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="widget-body">
|
23
|
-
<div class="tab-content">
|
24
|
-
<% current_page = "no-page" %>
|
25
|
-
<% @sections.each_with_index do |section, index| %>
|
26
|
-
<% if current_page != section.page %>
|
27
|
-
<% if index == 0 %>
|
28
|
-
<div class="tab-pane active" id="tab<%= index %>">
|
29
|
-
<% else %>
|
30
|
-
<div class="tab-pane" id="tab<%= index %>">
|
31
|
-
<% end %>
|
32
|
-
<% section_pages = Adminpanel::Section.of_page section.page %>
|
33
|
-
<%= render "sections_table", :sections => section_pages %>
|
34
|
-
</div>
|
35
|
-
<% current_page = section.page %>
|
36
|
-
<% end %>
|
37
|
-
<% end %>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
|
1
|
+
<%= provide(:page_title, "Secciones") %>
|
2
|
+
|
3
|
+
<div class="row-fluid">
|
4
|
+
<div class="widget widget-padding span12" id="wizard">
|
5
|
+
<div class="widget-header">
|
6
|
+
<ul class="nav nav-tabs">
|
7
|
+
<% current_page = "no-page" %>
|
8
|
+
<% @sections.each_with_index do |section, index| %>
|
9
|
+
<% if current_page != section.page %>
|
10
|
+
<% if index == 0 %>
|
11
|
+
<li class = "active">
|
12
|
+
<% else %>
|
13
|
+
<li>
|
14
|
+
<% end %>
|
15
|
+
<%= link_to (section.page.capitalize), "#tab#{index}", "data-toggle" => "tab" %></li>
|
16
|
+
<% current_page = section.page %>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
</ul>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="widget-body">
|
23
|
+
<div class="tab-content">
|
24
|
+
<% current_page = "no-page" %>
|
25
|
+
<% @sections.each_with_index do |section, index| %>
|
26
|
+
<% if current_page != section.page %>
|
27
|
+
<% if index == 0 %>
|
28
|
+
<div class="tab-pane active" id="tab<%= index %>">
|
29
|
+
<% else %>
|
30
|
+
<div class="tab-pane" id="tab<%= index %>">
|
31
|
+
<% end %>
|
32
|
+
<% section_pages = Adminpanel::Section.of_page section.page %>
|
33
|
+
<%= render "sections_table", :sections => section_pages %>
|
34
|
+
</div>
|
35
|
+
<% current_page = section.page %>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
@@ -1,27 +1,27 @@
|
|
1
|
-
<% provide(:page_title, "Nueva") %>
|
2
|
-
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
-
<div class="row-fluid">
|
4
|
-
<div class = "widget widget-padding span12">
|
5
|
-
<div class = "widget-header"><i class = "icon-tasks"></i><h5>Sección</h5></div>
|
6
|
-
<div class = "widget-body">
|
7
|
-
<div class = "widget-forms clearfix">
|
8
|
-
<%= custom_form_for(@section, :url => sections_path) do |f| %>
|
9
|
-
<%= render 'shared/error_messages', :object => @section %>
|
10
|
-
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre de la seccion" %>
|
11
|
-
<%= f.text_field :key, :label => "Identificador", :placeholder => "Identificador" %>
|
12
|
-
<div class="control-group">
|
13
|
-
<label class="control-label">Descripción</label>
|
14
|
-
<div class="controls">
|
15
|
-
<%= f.cktext_area :description, :label => t("Description") %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<%= f.radio_button_group :has_image, ['1', '0'], :label => "Tiene Imagen" %>
|
19
|
-
<%= f.radio_button_group :has_description, ['1', '0'], :label => "Tiene Descripcion" %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
<div class = "widget-footer">
|
23
|
-
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
24
|
-
</div>
|
25
|
-
<% end -%>
|
26
|
-
</div>
|
1
|
+
<% provide(:page_title, "Nueva") %>
|
2
|
+
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
+
<div class="row-fluid">
|
4
|
+
<div class = "widget widget-padding span12">
|
5
|
+
<div class = "widget-header"><i class = "icon-tasks"></i><h5>Sección</h5></div>
|
6
|
+
<div class = "widget-body">
|
7
|
+
<div class = "widget-forms clearfix">
|
8
|
+
<%= custom_form_for(@section, :url => sections_path) do |f| %>
|
9
|
+
<%= render 'shared/error_messages', :object => @section %>
|
10
|
+
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre de la seccion" %>
|
11
|
+
<%= f.text_field :key, :label => "Identificador", :placeholder => "Identificador" %>
|
12
|
+
<div class="control-group">
|
13
|
+
<label class="control-label">Descripción</label>
|
14
|
+
<div class="controls">
|
15
|
+
<%= f.cktext_area :description, :label => t("Description") %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<%= f.radio_button_group :has_image, ['1', '0'], :label => "Tiene Imagen" %>
|
19
|
+
<%= f.radio_button_group :has_description, ['1', '0'], :label => "Tiene Descripcion" %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class = "widget-footer">
|
23
|
+
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
24
|
+
</div>
|
25
|
+
<% end -%>
|
26
|
+
</div>
|
27
27
|
</div>
|
@@ -1,31 +1,31 @@
|
|
1
|
-
<% provide(:page_title, @section.name.humanize) %>
|
2
|
-
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
-
|
4
|
-
<div class="row-fluid">
|
5
|
-
<div class="widget widget-padding span12">
|
6
|
-
<div class="widget-header">
|
7
|
-
<i class="icon-tasks"></i>
|
8
|
-
<h5><%= @section.name.humanize %>
|
9
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_section_path(@section), :title => "Editar Seccion" %>
|
10
|
-
</h5>
|
11
|
-
</div>
|
12
|
-
<div class="widget-body row-fluid">
|
13
|
-
|
14
|
-
<div class="span2">
|
15
|
-
<b>Descripción</b>
|
16
|
-
</div>
|
17
|
-
<div class="span10">
|
18
|
-
<% if @section.description.nil? %>
|
19
|
-
<%= t("other.no description") %>
|
20
|
-
<% else %>
|
21
|
-
<%= @section.description.html_safe %>
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
<div class="span12">
|
25
|
-
<% @section.images.each do |image|-%>
|
26
|
-
<%= image_tag(image.file_url :thumb) %>
|
27
|
-
<% end %>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</div>
|
1
|
+
<% provide(:page_title, @section.name.humanize) %>
|
2
|
+
<% breadcrumb_add('Secciones', sections_path) %>
|
3
|
+
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="widget widget-padding span12">
|
6
|
+
<div class="widget-header">
|
7
|
+
<i class="icon-tasks"></i>
|
8
|
+
<h5><%= @section.name.humanize %>
|
9
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_section_path(@section), :title => "Editar Seccion" %>
|
10
|
+
</h5>
|
11
|
+
</div>
|
12
|
+
<div class="widget-body row-fluid">
|
13
|
+
|
14
|
+
<div class="span2">
|
15
|
+
<b>Descripción</b>
|
16
|
+
</div>
|
17
|
+
<div class="span10">
|
18
|
+
<% if @section.description.nil? %>
|
19
|
+
<%= t("other.no description") %>
|
20
|
+
<% else %>
|
21
|
+
<%= @section.description.html_safe %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
<div class="span12">
|
25
|
+
<% @section.images.each do |image|-%>
|
26
|
+
<%= image_tag(image.file_url :thumb) %>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
31
|
</div>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<h1>Admin::Sections#update</h1>
|
2
|
-
<p>Find me in app/views/admin/sections/update.html.erb</p>
|
1
|
+
<h1>Admin::Sections#update</h1>
|
2
|
+
<p>Find me in app/views/admin/sections/update.html.erb</p>
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<% provide(:title, 'Inicio') %>
|
2
|
-
<% provide(:section, 'login') %>
|
3
|
-
<div class="widget container-narrow">
|
4
|
-
<div class="widget-header">
|
5
|
-
<i class="icon-user"></i>
|
6
|
-
<h5><%= t("authentication.welcome") %></h5>
|
7
|
-
</div>
|
8
|
-
<div class="widget-body clearfix" style="padding:25px;">
|
9
|
-
<% flash.each do |key, value| %>
|
10
|
-
<div class = "alert alert-<%= key %>"><%= value %></div>
|
11
|
-
<% end %>
|
12
|
-
<%= form_for(:session, :url => sessions_path) do |f| %>
|
13
|
-
<div class="control-group">
|
14
|
-
<div class="controls">
|
15
|
-
<%= f.text_field :email, :class => "btn-block", :id => "inputEmail" , :placeholder => t("session.email") %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<div class="control-group">
|
19
|
-
<div class="controls">
|
20
|
-
<%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => t("session.password") %>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<%= f.submit "Iniciar Sesión", :class => "btn pull-right", :id => "signin-button" %>
|
24
|
-
<% end %>
|
25
|
-
</div>
|
1
|
+
<% provide(:title, 'Inicio') %>
|
2
|
+
<% provide(:section, 'login') %>
|
3
|
+
<div class="widget container-narrow">
|
4
|
+
<div class="widget-header">
|
5
|
+
<i class="icon-user"></i>
|
6
|
+
<h5><%= t("authentication.welcome") %></h5>
|
7
|
+
</div>
|
8
|
+
<div class="widget-body clearfix" style="padding:25px;">
|
9
|
+
<% flash.each do |key, value| %>
|
10
|
+
<div class = "alert alert-<%= key %>"><%= value %></div>
|
11
|
+
<% end %>
|
12
|
+
<%= form_for(:session, :url => sessions_path) do |f| %>
|
13
|
+
<div class="control-group">
|
14
|
+
<div class="controls">
|
15
|
+
<%= f.text_field :email, :class => "btn-block", :id => "inputEmail" , :placeholder => t("session.email") %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="control-group">
|
19
|
+
<div class="controls">
|
20
|
+
<%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => t("session.password") %>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
<%= f.submit "Iniciar Sesión", :class => "btn pull-right", :id => "signin-button" %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
26
|
</div>
|
@@ -1,21 +1,21 @@
|
|
1
|
-
<div class = "widget widget-padding span12">
|
2
|
-
<div class = "widget-header"><i class = "icon-user"></i><h5>Usuario</h5></div>
|
3
|
-
<div class = "widget-body">
|
4
|
-
<div class = "widget-forms clearfix">
|
5
|
-
<%= custom_form_for(@user) do |f| %>
|
6
|
-
<%= render 'shared/error_messages', :object => @user %>
|
7
|
-
|
8
|
-
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre del usuario" %>
|
9
|
-
|
10
|
-
<%= f.text_field :email, :label => t("model.attributes.Adminpanel::User.email"), :placeholder => t("model.attributes.Adminpanel::User.email") %>
|
11
|
-
|
12
|
-
<%= f.password_field :password, :label => t("model.attributes.Adminpanel::User.password"), :placeholder => t("model.attributes.Adminpanel::User.password") %>
|
13
|
-
|
14
|
-
<%= f.password_field :password_confirmation, :label => t("model.attributes.Adminpanel::User.password_confirmation"), :placeholder => t("model.attributes.Adminpanel::User.password_confirmation") %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<div class = "widget-footer">
|
18
|
-
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
19
|
-
</div>
|
20
|
-
<% end -%>
|
1
|
+
<div class = "widget widget-padding span12">
|
2
|
+
<div class = "widget-header"><i class = "icon-user"></i><h5>Usuario</h5></div>
|
3
|
+
<div class = "widget-body">
|
4
|
+
<div class = "widget-forms clearfix">
|
5
|
+
<%= custom_form_for(@user) do |f| %>
|
6
|
+
<%= render 'shared/error_messages', :object => @user %>
|
7
|
+
|
8
|
+
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre del usuario" %>
|
9
|
+
|
10
|
+
<%= f.text_field :email, :label => t("model.attributes.Adminpanel::User.email"), :placeholder => t("model.attributes.Adminpanel::User.email") %>
|
11
|
+
|
12
|
+
<%= f.password_field :password, :label => t("model.attributes.Adminpanel::User.password"), :placeholder => t("model.attributes.Adminpanel::User.password") %>
|
13
|
+
|
14
|
+
<%= f.password_field :password_confirmation, :label => t("model.attributes.Adminpanel::User.password_confirmation"), :placeholder => t("model.attributes.Adminpanel::User.password_confirmation") %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<div class = "widget-footer">
|
18
|
+
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
19
|
+
</div>
|
20
|
+
<% end -%>
|
21
21
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<% provide(:page_title, "Editar") %>
|
2
|
-
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
-
<% breadcrumb_add(@user.name, user_path(@user)) %>
|
4
|
-
<div class="row-fluid">
|
5
|
-
<%= render 'user_form' %>
|
1
|
+
<% provide(:page_title, "Editar") %>
|
2
|
+
<% breadcrumb_add('Usuarios', users_path) %>
|
3
|
+
<% breadcrumb_add(@user.name, user_path(@user)) %>
|
4
|
+
<div class="row-fluid">
|
5
|
+
<%= render 'user_form' %>
|
6
6
|
</div>
|
@@ -1,49 +1,49 @@
|
|
1
|
-
<%= provide(:page_title, t("model.Adminpanel::User")) %>
|
2
|
-
<div class="row-fluid">
|
3
|
-
<%=
|
4
|
-
link_to(
|
5
|
-
content_tag(:div,
|
6
|
-
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span, t("user.new"), nil),
|
7
|
-
:class => "btn btn-box span2"),
|
8
|
-
new_user_path
|
9
|
-
)
|
10
|
-
%>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="row-fluid">
|
14
|
-
<div class="widget widget-padding span12">
|
15
|
-
<div class="widget-header">
|
16
|
-
<i class="icon-user"></i>
|
17
|
-
<h5>Usuarios</h5>
|
18
|
-
</div>
|
19
|
-
<div class="widget-body">
|
20
|
-
<div class="dataTables_wrapper form-inline">
|
21
|
-
<table id="information-table" class="table table-striped table-bordered dataTable">
|
22
|
-
<thead>
|
23
|
-
<tr>
|
24
|
-
<th>Nombre</th>
|
25
|
-
<th>Acción</th>
|
26
|
-
</tr>
|
27
|
-
</thead>
|
28
|
-
<tbody>
|
29
|
-
<% @users.each do |user| %>
|
30
|
-
<tr>
|
31
|
-
<td><%= link_to user.name, user_path(user) %></td>
|
32
|
-
<td>
|
33
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_user_path(user), :title => "Editar"%>
|
34
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-remove'), user_path(user), :title => "Borrar", :method => :delete,
|
35
|
-
:data => { :confirm => "Seguro?" }
|
36
|
-
%>
|
37
|
-
</td>
|
38
|
-
</tr>
|
39
|
-
<% end %>
|
40
|
-
</tbody>
|
41
|
-
</table>
|
42
|
-
<div class="row-fluid">
|
43
|
-
<div class="span6"></div>
|
44
|
-
<div class="span6"></div>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
</div>
|
49
|
-
</div>
|
1
|
+
<%= provide(:page_title, t("model.Adminpanel::User")) %>
|
2
|
+
<div class="row-fluid">
|
3
|
+
<%=
|
4
|
+
link_to(
|
5
|
+
content_tag(:div,
|
6
|
+
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span, t("user.new"), nil),
|
7
|
+
:class => "btn btn-box span2"),
|
8
|
+
new_user_path
|
9
|
+
)
|
10
|
+
%>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="row-fluid">
|
14
|
+
<div class="widget widget-padding span12">
|
15
|
+
<div class="widget-header">
|
16
|
+
<i class="icon-user"></i>
|
17
|
+
<h5>Usuarios</h5>
|
18
|
+
</div>
|
19
|
+
<div class="widget-body">
|
20
|
+
<div class="dataTables_wrapper form-inline">
|
21
|
+
<table id="information-table" class="table table-striped table-bordered dataTable">
|
22
|
+
<thead>
|
23
|
+
<tr>
|
24
|
+
<th>Nombre</th>
|
25
|
+
<th>Acción</th>
|
26
|
+
</tr>
|
27
|
+
</thead>
|
28
|
+
<tbody>
|
29
|
+
<% @users.each do |user| %>
|
30
|
+
<tr>
|
31
|
+
<td><%= link_to user.name, user_path(user) %></td>
|
32
|
+
<td>
|
33
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_user_path(user), :title => "Editar"%>
|
34
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-remove'), user_path(user), :title => "Borrar", :method => :delete,
|
35
|
+
:data => { :confirm => "Seguro?" }
|
36
|
+
%>
|
37
|
+
</td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
<div class="row-fluid">
|
43
|
+
<div class="span6"></div>
|
44
|
+
<div class="span6"></div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|