adminpanel 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +7 -0
- data/Gemfile +16 -9
- data/README.md +12 -1
- data/Rakefile +3 -0
- data/adminpanel.gemspec +13 -9
- data/app/assets/stylesheets/adminpanel/theme.css +11 -3
- data/app/controllers/adminpanel/categories_controller.rb +1 -1
- data/app/controllers/adminpanel/products_controller.rb +1 -1
- data/app/controllers/adminpanel/sessions_controller.rb +5 -3
- data/app/helpers/adminpanel/application_helper.rb +1 -1
- data/app/models/adminpanel/section.rb +1 -0
- data/app/views/adminpanel/categories/index.html.erb +9 -9
- data/app/views/adminpanel/categories/new.html.erb +2 -2
- data/app/views/adminpanel/products/_image_fields.html.erb +1 -1
- data/app/views/adminpanel/products/_product_form.html.erb +4 -4
- data/app/views/adminpanel/products/edit.html.erb +1 -1
- data/app/views/adminpanel/products/index.html.erb +2 -6
- data/app/views/adminpanel/products/new.html.erb +1 -1
- data/app/views/adminpanel/sections/_image_fields.html.erb +1 -1
- data/app/views/adminpanel/sessions/new.html.erb +4 -4
- data/app/views/adminpanel/users/_user_form.html.erb +21 -0
- data/app/views/adminpanel/users/edit.html.erb +1 -17
- data/app/views/adminpanel/users/new.html.erb +1 -17
- data/app/views/layouts/_side_menu.html.erb +10 -11
- data/app/views/layouts/_top_bar.html.erb +2 -3
- data/app/views/layouts/admin-login.html.erb +27 -0
- data/app/views/layouts/admin.html.erb +2 -7
- data/app/views/shared/_error_messages.html.erb +2 -2
- data/config/database.yml +24 -0
- data/config/locales/es.yml +81 -181
- data/lib/adminpanel/version.rb +1 -1
- data/spec/dummy/.gitignore +0 -2
- data/spec/dummy/config/application.rb +2 -1
- data/spec/dummy/config/database.yml +24 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/features/authentication_pages_spec.rb +44 -0
- data/spec/features/categories_pages_spec.rb +44 -0
- data/spec/features/product_pages_spec.rb +53 -0
- data/spec/models/{adminpanel/category_spec.rb → category_spec.rb} +0 -1
- data/spec/models/{adminpanel/gallery_spec.rb → gallery_spec.rb} +0 -1
- data/spec/models/{adminpanel/image_uploader.rb → image_uploader.rb} +0 -1
- data/spec/models/{adminpanel/product_spec.rb → product_spec.rb} +0 -1
- data/spec/models/{adminpanel/section_spec.rb → section_spec.rb} +0 -1
- data/spec/models/{adminpanel/user_spec.rb → user_spec.rb} +0 -1
- data/spec/spec_helper.rb +7 -4
- data/spec/support/define_factory_models.rb +17 -0
- data/spec/support/helper_methods.rb +11 -0
- data/spec/support/submit_forms_without_button.rb +17 -0
- data/spec/uploaders/{adminpanel/gallery_uploader_spec.rb → gallery_uploader_spec.rb} +0 -0
- data/spec/uploaders/{adminpanel/image_uploader_spec.rb → image_uploader_spec.rb} +0 -0
- data/spec/uploaders/{adminpanel/section_uploader_spec.rb → section_uploader_spec.rb} +0 -0
- metadata +119 -149
- data/app/views/adminpanel/users/_form.html.erb +0 -33
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA512:
|
3
|
+
data.tar.gz: da08a9e643114230cacbf2c777edb198ef0fcdabaa5715e8f867931f513a909658cc5ccc7c46a835edc20370929d9ab442c7959edf03369f1809ad15c2dfccf7
|
4
|
+
metadata.gz: 0bd2c489b74f7d28e3984a248efd018dec4279e28d5ed84a801edfb647bf239509eacf0b403a8aea20e794aaad2f9dd0a1131437981ea42eac5582d784124059
|
5
|
+
SHA1:
|
6
|
+
data.tar.gz: 3a587ada3b82f1222a7d88520cbceed119383e9b
|
7
|
+
metadata.gz: 23cb1d56c4ade057b41987c51f3e862dbe874bbd
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -3,15 +3,22 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in adminpanel.gemspec
|
4
4
|
# gemspec
|
5
5
|
|
6
|
-
gem "rails", "3.2.12"
|
7
|
-
gem "carrierwave", "0.9.0"
|
8
|
-
gem "rmagick", "2.13.2"
|
9
|
-
gem "
|
10
|
-
gem "
|
11
|
-
gem "
|
12
|
-
gem "rails-i18n", "3.0.0"
|
6
|
+
gem "rails", "~> 3.2.12"
|
7
|
+
gem "carrierwave", "~> 0.9.0"
|
8
|
+
gem "rmagick", "~> 2.13.2"
|
9
|
+
gem "jquery-rails", "~> 3.0.4"
|
10
|
+
gem "bcrypt-ruby", "~> 3.0.0"
|
11
|
+
gem "rails-i18n", "~> 3.0.0"
|
13
12
|
|
14
13
|
group :test do
|
15
|
-
gem "
|
16
|
-
gem "
|
14
|
+
gem "bundler", "~> 1.3"
|
15
|
+
gem "activerecord", "3.2.12"
|
16
|
+
gem "rspec", "2.14.0"
|
17
|
+
gem "rspec-rails"
|
18
|
+
gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
|
19
|
+
gem "rake"
|
20
|
+
gem "factory_girl", "2.6.4"
|
21
|
+
gem "capybara", "1.1.4"
|
22
|
+
gem "nokogiri", "1.5.9"
|
23
|
+
gem "rubyzip", "0.9.9"
|
17
24
|
end
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
This gem is developed to be a CMS for Ruby 1.8.7 and Rails 3.2.12
|
4
4
|
|
5
|
+
[ ](https://travis-ci.org/joseramonc/adminpanel)
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -29,7 +31,11 @@ Then run:
|
|
29
31
|
rake db:migrate
|
30
32
|
to create the database that the adminpanel it's expecting.
|
31
33
|
|
32
|
-
|
34
|
+
Then, mount the gem wherever you like!
|
35
|
+
|
36
|
+
mount Adminpanel::Engine => "/admin"
|
37
|
+
|
38
|
+
Any doubts or errors feel free to ask me!
|
33
39
|
|
34
40
|
## Contributing
|
35
41
|
|
@@ -38,3 +44,8 @@ Any doubt feel free to ask me!
|
|
38
44
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
39
45
|
4. Push to the branch (`git push origin my-new-feature`)
|
40
46
|
5. Create new Pull Request
|
47
|
+
|
48
|
+
## To Do:
|
49
|
+
|
50
|
+
1. Add english support
|
51
|
+
2. Add the medium editor to the custom builder so it inits itself
|
data/Rakefile
CHANGED
data/adminpanel.gemspec
CHANGED
@@ -19,17 +19,21 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib", "app/assets"]
|
20
20
|
|
21
21
|
|
22
|
-
spec.add_dependency "rails", "3.2.12"
|
23
|
-
spec.add_dependency "carrierwave", "0.9.0"
|
24
|
-
spec.add_dependency "rmagick", "2.13.2"
|
25
|
-
spec.add_dependency "
|
26
|
-
spec.add_dependency "
|
27
|
-
spec.add_dependency "
|
28
|
-
spec.add_dependency "rails-i18n", "3.0.0"
|
22
|
+
spec.add_dependency "rails", "~> 3.2.12"
|
23
|
+
spec.add_dependency "carrierwave", "~> 0.9.0"
|
24
|
+
spec.add_dependency "rmagick", "~> 2.13.2"
|
25
|
+
spec.add_dependency "jquery-rails", "~> 3.0.4"
|
26
|
+
spec.add_dependency "bcrypt-ruby", "~> 3.0.0"
|
27
|
+
spec.add_dependency "rails-i18n", "~> 3.0.0"
|
29
28
|
|
30
29
|
spec.add_development_dependency "bundler", "~> 1.3"
|
31
|
-
spec.add_development_dependency "activerecord", "3.2.12"
|
30
|
+
spec.add_development_dependency "activerecord", "~> 3.2.12"
|
32
31
|
spec.add_development_dependency "rake"
|
33
32
|
spec.add_development_dependency "sqlite3"
|
34
|
-
spec.add_development_dependency "
|
33
|
+
spec.add_development_dependency "factory_girl_rails", "2.6.4"
|
34
|
+
spec.add_development_dependency "rspec", "~> 2.14.0"
|
35
|
+
spec.add_development_dependency "rspec-rails", "~> 2.14.0"
|
36
|
+
spec.add_development_dependency "capybara", "1.1.4"
|
37
|
+
spec.add_development_dependency "nokogiri", "1.5.9"
|
38
|
+
spec.add_development_dependency "rubyzip", "0.9.9"
|
35
39
|
end
|
@@ -34,13 +34,20 @@ input.focused{
|
|
34
34
|
position: relative;
|
35
35
|
z-index: 2;
|
36
36
|
}
|
37
|
-
|
37
|
+
|
38
|
+
.field_with_errors > input {
|
38
39
|
border-color: rgba(226, 119, 90, 0.6);
|
39
40
|
outline: 0 none;
|
40
41
|
position: relative;
|
41
42
|
z-index: 2;
|
43
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(226, 119, 90, 0.6);
|
42
44
|
}
|
43
|
-
|
45
|
+
|
46
|
+
.field_with_errors > select {
|
47
|
+
border-color: rgba(226, 119, 90, 0.6);
|
48
|
+
outline: 0 none;
|
49
|
+
position: relative;
|
50
|
+
z-index: 2;
|
44
51
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(226, 119, 90, 0.6);
|
45
52
|
}
|
46
53
|
input.warning, input.warning:focus{
|
@@ -1560,4 +1567,5 @@ table.table thead .sorting_desc_disabled { background: url('sort_desc_disabled.p
|
|
1560
1567
|
.logo {
|
1561
1568
|
margin: 0 90px 0 15px;
|
1562
1569
|
}
|
1563
|
-
}
|
1570
|
+
}
|
1571
|
+
|
@@ -11,7 +11,7 @@ module Adminpanel
|
|
11
11
|
def create
|
12
12
|
@category = Category.new(params[:category])
|
13
13
|
if @category.save
|
14
|
-
redirect_to categories_path, :notice => "
|
14
|
+
redirect_to categories_path, :notice => t("category.success")
|
15
15
|
else
|
16
16
|
render "new"
|
17
17
|
end
|
@@ -47,7 +47,7 @@ module Adminpanel
|
|
47
47
|
|
48
48
|
respond_to do |format|
|
49
49
|
if @product.save
|
50
|
-
format.html { redirect_to product_path(@product), :notice =>
|
50
|
+
format.html { redirect_to product_path(@product), :notice => t("product.success") }
|
51
51
|
format.json { render :json => product_path(@product), :status => :created, :location => @product }
|
52
52
|
else
|
53
53
|
@categories = Category.all.collect{|c| [ c.name, c.id ] }
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Adminpanel
|
2
2
|
class SessionsController < Adminpanel::ApplicationController
|
3
|
+
|
4
|
+
layout "login"
|
3
5
|
layout 'sessions'
|
4
6
|
skip_before_filter :signed_in_user
|
5
7
|
|
@@ -10,17 +12,17 @@ module Adminpanel
|
|
10
12
|
user = User.find_by_email(params[:session][:email].downcase)
|
11
13
|
if user && user.authenticate(params[:session][:password])
|
12
14
|
sign_in user
|
13
|
-
flash[:success] = "
|
15
|
+
flash[:success] = t("authentication.signin success")
|
14
16
|
redirect_to root_url
|
15
17
|
else
|
16
|
-
flash.now[:error] = "
|
18
|
+
flash.now[:error] = t("authentication.signin error")
|
17
19
|
render 'new'
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
23
|
def destroy
|
22
24
|
sign_out
|
23
|
-
redirect_to
|
25
|
+
redirect_to signin_path
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -8,6 +8,7 @@ module Adminpanel
|
|
8
8
|
mount_uploader :file, Adminpanel::SectionUploader
|
9
9
|
validates_length_of :description, :minimum => 10, :maximum => 10, :on => :update, :if => lambda{|section| section.key == "telephone"}
|
10
10
|
validates_presence_of :description, :minimum => 9, :on => :update, :if => lambda{|section| section.has_description == true}
|
11
|
+
validates :description, :numericality => { :only_integer => true }, :on => :update, :if => lambda{|section| section.key == "telephone"}
|
11
12
|
validates_presence_of :key
|
12
13
|
validates_presence_of :name
|
13
14
|
|
@@ -4,9 +4,10 @@
|
|
4
4
|
<%=
|
5
5
|
link_to(
|
6
6
|
content_tag(:div,
|
7
|
-
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span,
|
7
|
+
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span, t("category.new"), nil),
|
8
8
|
:class => "btn btn-box span2"),
|
9
|
-
new_category_path
|
9
|
+
new_category_path,
|
10
|
+
:id => "new-category-button"
|
10
11
|
)
|
11
12
|
%>
|
12
13
|
</div>
|
@@ -24,23 +25,22 @@
|
|
24
25
|
<thead>
|
25
26
|
<tr>
|
26
27
|
<th>Nombre</th>
|
27
|
-
<% #if can? :manage, Client %>
|
28
28
|
<th>Acción</th>
|
29
|
-
<% #end %>
|
30
29
|
</tr>
|
31
30
|
</thead>
|
32
31
|
<tbody>
|
33
32
|
<% @categories.each do |category| %>
|
34
33
|
<tr>
|
35
34
|
<td><%= category.name %></td>
|
36
|
-
<% #if can? :manage, category %>
|
37
35
|
<td>
|
38
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_category_path(category), :title => "
|
39
|
-
<%= link_to content_tag(:i, nil, :class => 'icon-remove'), category_path(category),
|
40
|
-
|
36
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), edit_category_path(category), :title => t("action.edit") %>
|
37
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-remove'), category_path(category),
|
38
|
+
:title => t("action.delete"),
|
39
|
+
:id => "category-delete",
|
40
|
+
:method => :delete,
|
41
|
+
:data => { :confirm => "Seguro?" }
|
41
42
|
%>
|
42
43
|
</td>
|
43
|
-
<% #end %>
|
44
44
|
</tr>
|
45
45
|
<% end %>
|
46
46
|
</tbody>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% provide(:page_title, "
|
1
|
+
<% provide(:page_title, t("category.new")) %>
|
2
2
|
<% breadcrumb_add('Categorias', products_path) %>
|
3
3
|
<div class="row-fluid">
|
4
4
|
<div class = "widget widget-padding span12">
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
<div class = "widget-footer">
|
14
|
-
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
14
|
+
<%= f.submit "Agregar", :disable_with => 'Submiting...', :id =>"new-category-button" %>
|
15
15
|
</div>
|
16
16
|
<% end -%>
|
17
17
|
</div>
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<div class = "widget-forms clearfix">
|
3
3
|
<%= custom_form_for(@product, {:class => "form-horizontal"}) do |f| %>
|
4
4
|
<%= render 'shared/error_messages', :object => @product %>
|
5
|
-
<%= f.text_field :name, :label => t("model.attributes.
|
6
|
-
<%= f.text_field :brief, :label => t("
|
5
|
+
<%= f.text_field :name, :label => t("model.attributes.Adminpanel::Product.name"), :placeholder => t("model.attributes.Adminpanel::Product.name") %>
|
6
|
+
<%= f.text_field :brief, :label => t("model.attributes.Adminpanel::Product.brief"), :placeholder => t("model.attributes.Adminpanel::Product.brief") %>
|
7
7
|
|
8
8
|
<div class="control-group">
|
9
|
-
<label class="control-label"><%= t
|
9
|
+
<label class="control-label"><%= t("Description") %></label>
|
10
10
|
<div class="controls">
|
11
11
|
<%= f.hidden_field :description, :id => "description-field" %>
|
12
12
|
<% if @product.description.nil? %>
|
@@ -26,6 +26,6 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
<div class = "widget-footer">
|
29
|
-
<%= f.submit t("
|
29
|
+
<%= f.submit t("action.save"), :disable_with => 'Submiting...', :id => "save-button" %>
|
30
30
|
</div>
|
31
31
|
<% end -%>
|
@@ -1,16 +1,14 @@
|
|
1
1
|
<%= provide(:page_title, "Productos") %>
|
2
|
-
<% #if can? :create, Client %>
|
3
2
|
<div class="row-fluid">
|
4
3
|
<%=
|
5
4
|
link_to(
|
6
5
|
content_tag(:div,
|
7
|
-
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span,
|
6
|
+
content_tag(:i, nil, :class => 'icon-plus-sign icon-2x') + content_tag(:span, t("product.new"), nil),
|
8
7
|
:class => "btn btn-box span2"),
|
9
8
|
new_product_path
|
10
9
|
)
|
11
10
|
%>
|
12
11
|
</div>
|
13
|
-
<% #end %>
|
14
12
|
|
15
13
|
<div class="row-fluid">
|
16
14
|
<div class="widget widget-padding span12">
|
@@ -25,9 +23,7 @@
|
|
25
23
|
<tr>
|
26
24
|
<th>Nombre</th>
|
27
25
|
<th>Descripción</th>
|
28
|
-
|
29
|
-
<th>Acción</th>
|
30
|
-
<% #end %>
|
26
|
+
<th>Acción</th>
|
31
27
|
</tr>
|
32
28
|
</thead>
|
33
29
|
<tbody>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="widget container-narrow">
|
4
4
|
<div class="widget-header">
|
5
5
|
<i class="icon-user"></i>
|
6
|
-
<h5
|
6
|
+
<h5><%= t("authentication.welcome") %></h5>
|
7
7
|
</div>
|
8
8
|
<div class="widget-body clearfix" style="padding:25px;">
|
9
9
|
<% flash.each do |key, value| %>
|
@@ -12,15 +12,15 @@
|
|
12
12
|
<%= form_for(:session, :url => sessions_path) do |f| %>
|
13
13
|
<div class="control-group">
|
14
14
|
<div class="controls">
|
15
|
-
<%= f.
|
15
|
+
<%= f.text_field :email, :class => "btn-block", :id => "inputEmail" , :placeholder => "Correo" %>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
<div class="control-group">
|
19
19
|
<div class="controls">
|
20
|
-
<%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => "
|
20
|
+
<%= f.password_field :password, :class => "btn-block", :id => "inputPassword", :placeholder => t("Password") %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
|
-
<%= f.submit "Iniciar Sesión", :class => "btn pull-right" %>
|
23
|
+
<%= f.submit "Iniciar Sesión", :class => "btn pull-right", :id => "signin-button" %>
|
24
24
|
<% end %>
|
25
25
|
</div>
|
26
26
|
</div>
|
@@ -0,0 +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 -%>
|
21
|
+
</div>
|
@@ -2,21 +2,5 @@
|
|
2
2
|
<% breadcrumb_add('Usuarios', users_path) %>
|
3
3
|
<% breadcrumb_add(@user.name, user_path(@user)) %>
|
4
4
|
<div class="row-fluid">
|
5
|
-
|
6
|
-
<div class = "widget-header"><i class = "icon-user"></i><h5>Usuario</h5></div>
|
7
|
-
<div class = "widget-body">
|
8
|
-
<div class = "widget-forms clearfix">
|
9
|
-
<%= custom_form_for(@user, :url => user_path(@user)) do |f| %>
|
10
|
-
<%= render 'shared/error_messages', :object => @user %>
|
11
|
-
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre del usuario" %>
|
12
|
-
<%= f.text_field :email, :label => t("Email"), :placeholder => t("Email") %>
|
13
|
-
<%= f.password_field :password, :label => t("Password"), :placeholder => t("Password") %>
|
14
|
-
<%= f.password_field :password_confirmation, :label => "Confirmar", :placeholder => "Confirmar" %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<div class = "widget-footer">
|
18
|
-
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
19
|
-
</div>
|
20
|
-
<% end -%>
|
21
|
-
</div>
|
5
|
+
<%= render 'user_form' %>
|
22
6
|
</div>
|
@@ -2,21 +2,5 @@
|
|
2
2
|
<% breadcrumb_add('Usuarios', users_path) %>
|
3
3
|
|
4
4
|
<div class="row-fluid">
|
5
|
-
|
6
|
-
<div class = "widget-header"><i class = "icon-user"></i><h5>Usuario</h5></div>
|
7
|
-
<div class = "widget-body">
|
8
|
-
<div class = "widget-forms clearfix">
|
9
|
-
<%= custom_form_for(@user, :url => users_path) do |f| %>
|
10
|
-
<%= render 'shared/error_messages', :object => @user %>
|
11
|
-
<%= f.text_field :name, :label => "Nombre", :placeholder => "Nombre del usuario" %>
|
12
|
-
<%= f.text_field :email, :label => t("Email"), :placeholder => t("Email") %>
|
13
|
-
<%= f.password_field :password, :label => t("Password"), :placeholder => t("Password") %>
|
14
|
-
<%= f.password_field :password_confirmation, :label => "Confirmar", :placeholder => "Confirmar" %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<div class = "widget-footer">
|
18
|
-
<%= f.submit "Agregar", :disable_with => 'Submiting...' %>
|
19
|
-
</div>
|
20
|
-
<% end -%>
|
21
|
-
</div>
|
5
|
+
<%= render 'user_form' %>
|
22
6
|
</div>
|