adminpanel 0.1.1 → 1.0.0
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.
- 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,24 +1,24 @@
|
|
|
1
|
-
<div class="product-image">
|
|
2
|
-
<% unless f.object.new_record? %>
|
|
3
|
-
<div class="control-group">
|
|
4
|
-
<div class="controls">
|
|
5
|
-
<%= image_tag f.object.file_url(:thumb) %>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
<% end %>
|
|
9
|
-
<div class="control-group">
|
|
10
|
-
<%= f.label t("model.Adminpanel::Image"), :class => "control-label" %>
|
|
11
|
-
<div class="controls">
|
|
12
|
-
<%= f.file_field :file %>
|
|
13
|
-
<%= f.hidden_field :model, :value => model_name %>
|
|
14
|
-
<%= f.hidden_field :_destroy %>
|
|
15
|
-
<%=
|
|
16
|
-
content_tag(
|
|
17
|
-
:button,
|
|
18
|
-
t("action.delete"),
|
|
19
|
-
:class => "btn btn-danger remove_fields"
|
|
20
|
-
)
|
|
21
|
-
%>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
1
|
+
<div class="product-image">
|
|
2
|
+
<% unless f.object.new_record? %>
|
|
3
|
+
<div class="control-group">
|
|
4
|
+
<div class="controls">
|
|
5
|
+
<%= image_tag f.object.file_url(:thumb) %>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<% end %>
|
|
9
|
+
<div class="control-group">
|
|
10
|
+
<%= f.label t("model.Adminpanel::Image"), :class => "control-label" %>
|
|
11
|
+
<div class="controls">
|
|
12
|
+
<%= f.file_field :file %>
|
|
13
|
+
<%= f.hidden_field :model, :value => model_name %>
|
|
14
|
+
<%= f.hidden_field :_destroy %>
|
|
15
|
+
<%=
|
|
16
|
+
content_tag(
|
|
17
|
+
:button,
|
|
18
|
+
t("action.delete"),
|
|
19
|
+
:class => "btn btn-danger remove_fields"
|
|
20
|
+
)
|
|
21
|
+
%>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
24
|
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var elements = document.querySelectorAll('#<%= field_var %>'),
|
|
2
|
+
<%= field_var %> = new MediumEditor(elements,{
|
|
3
|
+
buttons: [
|
|
4
|
+
'bold',
|
|
5
|
+
'italic',
|
|
6
|
+
'underline',
|
|
7
|
+
'anchor',
|
|
8
|
+
'header1',
|
|
9
|
+
'header2',
|
|
10
|
+
'quote',
|
|
11
|
+
'unorderedlist'
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
$(document).ready(function(){
|
|
16
|
+
$("#<%= field_var %>").on("focusout", function(){
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
//alert(document.getElementById("<%= field_var %>-field").value);
|
|
20
|
+
//.value = <%= field_var %>.serialize()["editable"]["value"];
|
|
21
|
+
//$("#<%= field_var %>-field").value = <%= field_var %>.serialize()["editable"]["value"];
|
|
22
|
+
document.getElementById("<%= field_var %>-field").value = <%= field_var %>.serialize()["<%= field_var %>"]["value"];
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<% provide(:page_title,t("action.update") + " #{@model.display_name.capitalize}") -%>
|
|
2
|
+
<% breadcrumb_add(
|
|
3
|
+
@model.display_name.capitalize.pluralize,
|
|
4
|
+
{
|
|
5
|
+
:controller => params[:controller],
|
|
6
|
+
:action => "index"
|
|
7
|
+
}
|
|
8
|
+
) %>
|
|
9
|
+
|
|
10
|
+
<div class="row-fluid">
|
|
11
|
+
<div class = "widget widget-padding span12">
|
|
12
|
+
<div class = "widget-header">
|
|
13
|
+
<%= content_tag(:i, nil, :class => @model.icon) %>
|
|
14
|
+
<h5><%= t("action.update") + " " + @model.display_name %></h5>
|
|
15
|
+
</div>
|
|
16
|
+
<div class = "widget-body">
|
|
17
|
+
<div class = "widget-forms clearfix">
|
|
18
|
+
<%= custom_form_for(resource, :html => {:class => "form-horizontal"}) do |f| -%>
|
|
19
|
+
<%= render 'shared/error_messages', :object => resource %>
|
|
20
|
+
<%= render 'shared/form_fields', :f => f %>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class = "widget-footer">
|
|
24
|
+
<%= f.submit t("action.save") + " " + @model.display_name, :disable_with => t("action.submitting"), :id =>"new-resource-button" %>
|
|
25
|
+
</div>
|
|
26
|
+
<% end -%>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<% provide(:page_title, @model.display_name) -%>
|
|
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, "Crear #{@model.display_name}", nil),
|
|
7
|
+
:class => "btn btn-box span2"),
|
|
8
|
+
{
|
|
9
|
+
:controller => params[:controller],
|
|
10
|
+
:action => "new"
|
|
11
|
+
}
|
|
12
|
+
)
|
|
13
|
+
%>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="row-fluid">
|
|
17
|
+
<div class="widget widget-padding span12">
|
|
18
|
+
<div class="widget-header">
|
|
19
|
+
<%= content_tag(:i, nil, :class => @model.icon) %>
|
|
20
|
+
<h5>
|
|
21
|
+
<%= @model.display_name %>
|
|
22
|
+
</h5>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="widget-body">
|
|
25
|
+
<div class="dataTables_wrapper form-inline">
|
|
26
|
+
<table id="information-table" class="table table-striped table-bordered dataTable">
|
|
27
|
+
<thead><!-- model attributes -->
|
|
28
|
+
<tr>
|
|
29
|
+
<% @model.form_attributes.each do |fields| %>
|
|
30
|
+
<% fields.each do |attribute, properties| %>
|
|
31
|
+
<% if properties["type"] != "adminpanel_file_field" %>
|
|
32
|
+
<th><%= properties["name"] %></th>
|
|
33
|
+
<% end %>
|
|
34
|
+
<% end %>
|
|
35
|
+
<% end %>
|
|
36
|
+
<th><%= I18n.t("actions") %></th>
|
|
37
|
+
</tr>
|
|
38
|
+
</thead><!-- Ends model attributes -->
|
|
39
|
+
<tbody>
|
|
40
|
+
<% collection.each do |member| %>
|
|
41
|
+
<tr>
|
|
42
|
+
<% @model.form_attributes.each do |fields| %>
|
|
43
|
+
<% fields.each do |attribute, properties| %>
|
|
44
|
+
<% if properties["type"] == "wysiwyg_field" %>
|
|
45
|
+
<td><%= member.send(attribute).html_safe -%></td>
|
|
46
|
+
<% elsif properties["type"] != "adminpanel_file_field" %>
|
|
47
|
+
<td><%= member.send(attribute) -%></td>
|
|
48
|
+
<% end %>
|
|
49
|
+
<% end %>
|
|
50
|
+
<% end %>
|
|
51
|
+
<td>
|
|
52
|
+
<%=
|
|
53
|
+
link_to(
|
|
54
|
+
content_tag(:i, nil, :class => 'icon-zoom-in'),
|
|
55
|
+
[member],
|
|
56
|
+
:title => t("action.show")
|
|
57
|
+
)
|
|
58
|
+
%>
|
|
59
|
+
|
|
60
|
+
<%=
|
|
61
|
+
link_to(
|
|
62
|
+
content_tag(:i, nil, :class => 'icon-pencil'),
|
|
63
|
+
[:edit, member],
|
|
64
|
+
:title => t("action.edit")
|
|
65
|
+
)
|
|
66
|
+
%>
|
|
67
|
+
|
|
68
|
+
<%=
|
|
69
|
+
link_to(
|
|
70
|
+
content_tag(
|
|
71
|
+
:i,
|
|
72
|
+
nil,
|
|
73
|
+
:class => 'icon-remove'
|
|
74
|
+
),
|
|
75
|
+
[member],
|
|
76
|
+
:title => I18n.t("action.delete"),
|
|
77
|
+
:id => "category-delete",
|
|
78
|
+
:method => :delete,
|
|
79
|
+
:data => { :confirm => "Eliminar #{@model.display_name}?" }
|
|
80
|
+
)
|
|
81
|
+
%>
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
<% end %>
|
|
85
|
+
</tbody>
|
|
86
|
+
</table>
|
|
87
|
+
<div class="row-fluid">
|
|
88
|
+
<div class="span6"></div>
|
|
89
|
+
<div class="span6"></div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<% provide(:page_title, t("action.create") + " #{@model.display_name.capitalize}") -%>
|
|
2
|
+
<% breadcrumb_add(
|
|
3
|
+
@model.display_name.capitalize.pluralize,
|
|
4
|
+
{
|
|
5
|
+
:controller => params[:controller],
|
|
6
|
+
:action => "index"
|
|
7
|
+
}
|
|
8
|
+
) %>
|
|
9
|
+
|
|
10
|
+
<div class="row-fluid">
|
|
11
|
+
<div class = "widget widget-padding span12">
|
|
12
|
+
<div class = "widget-header">
|
|
13
|
+
<%= content_tag(:i, nil, :class => @model.icon) %>
|
|
14
|
+
<h5><%= t("action.create") + " " + @model.display_name %></h5>
|
|
15
|
+
</div>
|
|
16
|
+
<div class = "widget-body">
|
|
17
|
+
<div class = "widget-forms clearfix">
|
|
18
|
+
<%= custom_form_for(resource, :html => {:class => "form-horizontal"}) do |f| -%>
|
|
19
|
+
<%= render 'shared/error_messages', :object => resource %>
|
|
20
|
+
<%= render 'shared/form_fields', :f => f %>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class = "widget-footer">
|
|
24
|
+
<%= f.submit t("action.add") + " " + @model.display_name, :disable_with => t("action.submitting"), :id =>"new-resource-button" %>
|
|
25
|
+
</div>
|
|
26
|
+
<% end -%>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<% provide(:page_title, t("action.view") + " #{@model.display_name.capitalize}") -%>
|
|
2
|
+
<% breadcrumb_add(
|
|
3
|
+
@model.display_name.capitalize.pluralize,
|
|
4
|
+
{
|
|
5
|
+
:controller => params[:controller],
|
|
6
|
+
:action => "index"
|
|
7
|
+
}
|
|
8
|
+
) %>
|
|
9
|
+
|
|
10
|
+
<div class="row-fluid">
|
|
11
|
+
<div class="widget span6">
|
|
12
|
+
<div class="widget-header">
|
|
13
|
+
<%= content_tag(:i, nil, :class => @model.icon) %>
|
|
14
|
+
<h5><%= @model.display_name.humanize %>
|
|
15
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), [:edit, resource], :title => t("action.edit") + " #{@model.display_name}" %>
|
|
16
|
+
</h5>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="widget-body">
|
|
19
|
+
<div class="widget-tickets widget-tickets-large clearfix"><ul>
|
|
20
|
+
<% @model.form_attributes.each do |fields| %>
|
|
21
|
+
<% fields.each do |attribute, properties| %>
|
|
22
|
+
<% if properties["type"] != "adminpanel_file_field" %>
|
|
23
|
+
<li class="priority-high">
|
|
24
|
+
<div class="span3">
|
|
25
|
+
<h6><%= properties["name"] %></h6>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="span8">
|
|
28
|
+
<% if properties["type"] == "wysiwyg_field" %>
|
|
29
|
+
<%= resource.send(attribute).html_safe -%>
|
|
30
|
+
<% else %>
|
|
31
|
+
<%= resource.send(attribute) -%>
|
|
32
|
+
<% end %>
|
|
33
|
+
</div>
|
|
34
|
+
</li>
|
|
35
|
+
<% end %>
|
|
36
|
+
<% end %>
|
|
37
|
+
<% end %>
|
|
38
|
+
</ul>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<% if @model.has_images? %>
|
|
44
|
+
<div class="widget widget-padding span6">
|
|
45
|
+
<div class="widget-header">
|
|
46
|
+
<%= content_tag(:i, nil, :class => @model.icon) %>
|
|
47
|
+
<h5>Galería: <%= @model.display_name.humanize %>
|
|
48
|
+
<%= link_to content_tag(:i, nil, :class => 'icon-pencil'), [:edit, resource], :title => t("action.edit") + " #{@model.display_name}" %>
|
|
49
|
+
</h5>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="widget-body row-fluid">
|
|
52
|
+
<div id="gallery-container" class="js-masonry"
|
|
53
|
+
data-masonry-options='{ "columnWidth": 3, "itemSelector": ".gallery-item" }'>
|
|
54
|
+
<% resource.images.each do |image|%>
|
|
55
|
+
<div class="gallery-item">
|
|
56
|
+
<%= link_to (image_tag image.file_url(:thumb)), image.file.to_s, :rel => "group", :name => @model.display_name %>
|
|
57
|
+
</div>
|
|
58
|
+
<% end %>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<% end %>
|
|
63
|
+
</div>
|
data/config/locales/en.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Sample localization file for English. Add more files in this directory for other locales.
|
|
2
|
-
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
|
3
|
-
|
|
4
|
-
en:
|
|
5
|
-
hello: "Hello world"
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
|
3
|
+
|
|
4
|
+
en:
|
|
5
|
+
hello: "Hello world"
|
data/config/locales/es.yml
CHANGED
|
@@ -1,130 +1,128 @@
|
|
|
1
|
-
es:
|
|
2
|
-
model:
|
|
3
|
-
Adminpanel::User: "Usuario"
|
|
4
|
-
Adminpanel::Product: "Producto"
|
|
5
|
-
Adminpanel::Gallery: "Galería de Inicio"
|
|
6
|
-
Adminpanel::Section: "Sección"
|
|
7
|
-
Adminpanel::Image: "Imagen"
|
|
8
|
-
Adminpanel::Category: "Categoría"
|
|
9
|
-
attributes:
|
|
10
|
-
Adminpanel::User:
|
|
11
|
-
email: "Correo electrónico"
|
|
12
|
-
password_digest: "Confirmar contraseña"
|
|
13
|
-
name: "Nombre"
|
|
14
|
-
password: "Contraseña"
|
|
15
|
-
password_confirmation: "Confirmar contraseña"
|
|
16
|
-
Adminpanel::Section:
|
|
17
|
-
description: "Descripción"
|
|
18
|
-
file: "Imagen"
|
|
19
|
-
Adminpanel::Gallery:
|
|
20
|
-
file: "Imagen"
|
|
21
|
-
Adminpanel::Category:
|
|
22
|
-
name: "Nombre"
|
|
23
|
-
Adminpanel::Product:
|
|
24
|
-
name: "Nombre"
|
|
25
|
-
brief: "Pequeña descripción"
|
|
26
|
-
category_id: "Categoría"
|
|
27
|
-
errors:
|
|
28
|
-
one: "%{model} no pudo guardarse debido a 1 error"
|
|
29
|
-
other: "%{model} no pudo guardarse debido a %{count} errores"
|
|
30
|
-
activerecord:
|
|
31
|
-
errors:
|
|
32
|
-
models:
|
|
33
|
-
adminpanel/category:
|
|
34
|
-
attributes:
|
|
35
|
-
name:
|
|
36
|
-
blank: "no puede estar vacío"
|
|
37
|
-
adminpanel/user:
|
|
38
|
-
attributes:
|
|
39
|
-
password_digest:
|
|
40
|
-
blank: "no puede estar vacío"
|
|
41
|
-
name:
|
|
42
|
-
blank: "no puede estar vacío"
|
|
43
|
-
password:
|
|
44
|
-
blank: "no puede estar vacío"
|
|
45
|
-
too_short: "es muy corta, mínimo 6 caracteres"
|
|
46
|
-
confirmation: "Deben ser iguales"
|
|
47
|
-
password_confirmation:
|
|
48
|
-
blank: "no puede estar vacío"
|
|
49
|
-
email:
|
|
50
|
-
blank: "no puede estar vacío"
|
|
51
|
-
invalid: "no es un correo"
|
|
52
|
-
taken: "ya está en uso"
|
|
53
|
-
adminpanel/gallery:
|
|
54
|
-
attributes:
|
|
55
|
-
file:
|
|
56
|
-
blank: "no puede estar vacía"
|
|
57
|
-
adminpanel/section:
|
|
58
|
-
attributes:
|
|
59
|
-
description:
|
|
60
|
-
blank: "no puede estar vacía"
|
|
61
|
-
too_long: "es muy larga"
|
|
62
|
-
too_short: "es muy corta"
|
|
63
|
-
not_a_number: "tienen que ser sólo números"
|
|
64
|
-
file:
|
|
65
|
-
blank: "no puede estar vacía"
|
|
66
|
-
adminpanel/product:
|
|
67
|
-
attributes:
|
|
68
|
-
name:
|
|
69
|
-
blank: "no puede estar vacío"
|
|
70
|
-
category_id:
|
|
71
|
-
blank: "no puede estar vacía"
|
|
72
|
-
brief:
|
|
73
|
-
blank: "no puede estar vacía"
|
|
74
|
-
gallery:
|
|
75
|
-
attributes:
|
|
76
|
-
description:
|
|
77
|
-
blank: "no puede estar vacía"
|
|
78
|
-
file:
|
|
79
|
-
blank: "no puede estar vacía"
|
|
80
|
-
name:
|
|
81
|
-
blank: "no puede estar vacío"
|
|
82
|
-
time:
|
|
83
|
-
formats:
|
|
84
|
-
graphic: "%Y-%m-%d %H:%M:%S"
|
|
85
|
-
long: "%d/%m/%Y %l:%M:%S %p"
|
|
86
|
-
short: "%d de %B de %Y"
|
|
87
|
-
estimate: "%Y-%m-%d"
|
|
88
|
-
Add Image: "Agregar Imagen"
|
|
89
|
-
Write description here: "Escriba la descripción aquí"
|
|
90
|
-
Panel title: "Panel Administrativo"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
email: "Correo electrónico"
|
|
129
|
-
other:
|
|
1
|
+
es:
|
|
2
|
+
model:
|
|
3
|
+
Adminpanel::User: "Usuario"
|
|
4
|
+
Adminpanel::Product: "Producto"
|
|
5
|
+
Adminpanel::Gallery: "Galería de Inicio"
|
|
6
|
+
Adminpanel::Section: "Sección"
|
|
7
|
+
Adminpanel::Image: "Imagen"
|
|
8
|
+
Adminpanel::Category: "Categoría"
|
|
9
|
+
attributes:
|
|
10
|
+
Adminpanel::User:
|
|
11
|
+
email: "Correo electrónico"
|
|
12
|
+
password_digest: "Confirmar contraseña"
|
|
13
|
+
name: "Nombre"
|
|
14
|
+
password: "Contraseña"
|
|
15
|
+
password_confirmation: "Confirmar contraseña"
|
|
16
|
+
Adminpanel::Section:
|
|
17
|
+
description: "Descripción"
|
|
18
|
+
file: "Imagen"
|
|
19
|
+
Adminpanel::Gallery:
|
|
20
|
+
file: "Imagen"
|
|
21
|
+
Adminpanel::Category:
|
|
22
|
+
name: "Nombre"
|
|
23
|
+
Adminpanel::Product:
|
|
24
|
+
name: "Nombre"
|
|
25
|
+
brief: "Pequeña descripción"
|
|
26
|
+
category_id: "Categoría"
|
|
27
|
+
errors:
|
|
28
|
+
one: "%{model} no pudo guardarse debido a 1 error"
|
|
29
|
+
other: "%{model} no pudo guardarse debido a %{count} errores"
|
|
30
|
+
activerecord:
|
|
31
|
+
errors:
|
|
32
|
+
models:
|
|
33
|
+
adminpanel/category:
|
|
34
|
+
attributes:
|
|
35
|
+
name:
|
|
36
|
+
blank: "no puede estar vacío"
|
|
37
|
+
adminpanel/user:
|
|
38
|
+
attributes:
|
|
39
|
+
password_digest:
|
|
40
|
+
blank: "no puede estar vacío"
|
|
41
|
+
name:
|
|
42
|
+
blank: "no puede estar vacío"
|
|
43
|
+
password:
|
|
44
|
+
blank: "no puede estar vacío"
|
|
45
|
+
too_short: "es muy corta, mínimo 6 caracteres"
|
|
46
|
+
confirmation: "Deben ser iguales"
|
|
47
|
+
password_confirmation:
|
|
48
|
+
blank: "no puede estar vacío"
|
|
49
|
+
email:
|
|
50
|
+
blank: "no puede estar vacío"
|
|
51
|
+
invalid: "no es un correo"
|
|
52
|
+
taken: "ya está en uso"
|
|
53
|
+
adminpanel/gallery:
|
|
54
|
+
attributes:
|
|
55
|
+
file:
|
|
56
|
+
blank: "no puede estar vacía"
|
|
57
|
+
adminpanel/section:
|
|
58
|
+
attributes:
|
|
59
|
+
description:
|
|
60
|
+
blank: "no puede estar vacía"
|
|
61
|
+
too_long: "es muy larga"
|
|
62
|
+
too_short: "es muy corta"
|
|
63
|
+
not_a_number: "tienen que ser sólo números"
|
|
64
|
+
file:
|
|
65
|
+
blank: "no puede estar vacía"
|
|
66
|
+
adminpanel/product:
|
|
67
|
+
attributes:
|
|
68
|
+
name:
|
|
69
|
+
blank: "no puede estar vacío"
|
|
70
|
+
category_id:
|
|
71
|
+
blank: "no puede estar vacía"
|
|
72
|
+
brief:
|
|
73
|
+
blank: "no puede estar vacía"
|
|
74
|
+
gallery:
|
|
75
|
+
attributes:
|
|
76
|
+
description:
|
|
77
|
+
blank: "no puede estar vacía"
|
|
78
|
+
file:
|
|
79
|
+
blank: "no puede estar vacía"
|
|
80
|
+
name:
|
|
81
|
+
blank: "no puede estar vacío"
|
|
82
|
+
time:
|
|
83
|
+
formats:
|
|
84
|
+
graphic: "%Y-%m-%d %H:%M:%S"
|
|
85
|
+
long: "%d/%m/%Y %l:%M:%S %p"
|
|
86
|
+
short: "%d de %B de %Y"
|
|
87
|
+
estimate: "%Y-%m-%d"
|
|
88
|
+
Add Image: "Agregar Imagen"
|
|
89
|
+
Write description here: "Escriba la descripción aquí"
|
|
90
|
+
Panel title: "Panel Administrativo"
|
|
91
|
+
actions: "Acciones"
|
|
92
|
+
action:
|
|
93
|
+
add: "Agregar"
|
|
94
|
+
create: "Crear"
|
|
95
|
+
show: "Ver"
|
|
96
|
+
submitting: "Enviando..."
|
|
97
|
+
save: "Guardar"
|
|
98
|
+
edit: "Editar"
|
|
99
|
+
update: "Actualizar"
|
|
100
|
+
delete: "Eliminar"
|
|
101
|
+
view: "Ver"
|
|
102
|
+
delete confirmation: "Estás seguro que desea eliminar?"
|
|
103
|
+
authentication:
|
|
104
|
+
welcome: "Bienvenido! Inicia Sesión"
|
|
105
|
+
signin error: "Contraseña incorrecta"
|
|
106
|
+
signin success: "Bienvenido!"
|
|
107
|
+
gallery:
|
|
108
|
+
new: "Agregar Imagen"
|
|
109
|
+
success: "La imagen ha sido guardada"
|
|
110
|
+
deleted: "La imagen ha sido eliminada"
|
|
111
|
+
moved : "Se ha actualizado la posición de la galería"
|
|
112
|
+
not-moved: "No se pudo mover la Imagen"
|
|
113
|
+
image: "Imagen"
|
|
114
|
+
position: "Posición"
|
|
115
|
+
action: "Acción"
|
|
116
|
+
user:
|
|
117
|
+
new: "Agregar Usuario"
|
|
118
|
+
success: "El usuario ha sido guardado"
|
|
119
|
+
section:
|
|
120
|
+
name: "Nombre"
|
|
121
|
+
description: "Descripción"
|
|
122
|
+
edit: "Editar Sección"
|
|
123
|
+
default: "Sin Sección"
|
|
124
|
+
session:
|
|
125
|
+
password: "Contraseña"
|
|
126
|
+
email: "Correo electrónico"
|
|
127
|
+
other:
|
|
130
128
|
no description: "No tiene descripción aún"
|