web_admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/Gemfile +32 -0
- data/Gemfile.lock +335 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +22 -0
- data/app/assets/images/web_admin/.keep +0 -0
- data/app/assets/images/web_admin/avatar.jpg +0 -0
- data/app/assets/images/web_admin/first_icon.png +0 -0
- data/app/assets/images/web_admin/render-1-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-1.jpg +0 -0
- data/app/assets/images/web_admin/render-2-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-2.jpg +0 -0
- data/app/assets/images/web_admin/render-3-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-3.jpg +0 -0
- data/app/assets/images/web_admin/render-4-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-4.jpg +0 -0
- data/app/assets/images/web_admin/responsive.png +0 -0
- data/app/assets/javascripts/web_admin/app.data.js +336 -0
- data/app/assets/javascripts/web_admin/app.js +172 -0
- data/app/assets/javascripts/web_admin/app.plugin.js +220 -0
- data/app/assets/javascripts/web_admin/application.js +20 -0
- data/app/assets/javascripts/web_admin/bootstrap-filestyle.min.js +1 -0
- data/app/assets/javascripts/web_admin/bootstrap.js +1951 -0
- data/app/assets/javascripts/web_admin/charts/easypiechart/jquery.easy-pie-chart.js +184 -0
- data/app/assets/javascripts/web_admin/charts/sparkline/jquery.sparkline.min.js +5 -0
- data/app/assets/javascripts/web_admin/combodate/combodate.js +453 -0
- data/app/assets/javascripts/web_admin/combodate/moment.min.js +6 -0
- data/app/assets/javascripts/web_admin/data/datagrid.json +1900 -0
- data/app/assets/javascripts/web_admin/data/datatable.json +401 -0
- data/app/assets/javascripts/web_admin/datatables/jquery.dataTables.min.js +155 -0
- data/app/assets/javascripts/web_admin/datepicker/bootstrap-datepicker.js +474 -0
- data/app/assets/javascripts/web_admin/datepicker.js +3 -0
- data/app/assets/javascripts/web_admin/fuelux/fuelux.js +1645 -0
- data/app/assets/javascripts/web_admin/fullcalendar/fullcalendar.min.js +7 -0
- data/app/assets/javascripts/web_admin/grid/gallery.js +14 -0
- data/app/assets/javascripts/web_admin/grid/jquery.grid-a-licious.min.js +15 -0
- data/app/assets/javascripts/web_admin/grid/masonry.pkgd.min.js +9 -0
- data/app/assets/javascripts/web_admin/ie/excanvas.js +924 -0
- data/app/assets/javascripts/web_admin/ie/html5.js +9 -0
- data/app/assets/javascripts/web_admin/ie/respond.min.js +6 -0
- data/app/assets/javascripts/web_admin/jquery-ui-1.10.3.custom.min.js +6 -0
- data/app/assets/javascripts/web_admin/jquery.datetimepicker.js +1851 -0
- data/app/assets/javascripts/web_admin/jquery.ui.touch-punch.min.js +11 -0
- data/app/assets/javascripts/web_admin/parsley/parsley.min.js +35 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/default_thumb.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/loader.gif +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_next.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_prev.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_x.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_y.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/jquery.prettyPhoto.js +7 -0
- data/app/assets/javascripts/web_admin/prettyphoto/prettyPhoto.css +170 -0
- data/app/assets/javascripts/web_admin/select2/select2.css +652 -0
- data/app/assets/javascripts/web_admin/select2/select2.min.js +22 -0
- data/app/assets/javascripts/web_admin/slider/bootstrap-slider.js +388 -0
- data/app/assets/javascripts/web_admin/underscore-min.js +7 -0
- data/app/assets/javascripts/web_admin/underscore-min.map +1 -0
- data/app/assets/javascripts/web_admin/upload_image.js +39 -0
- data/app/assets/stylesheets/web_admin/application.css +15 -0
- data/app/assets/stylesheets/web_admin/bootstrap.css +5784 -0
- data/app/assets/stylesheets/web_admin/font-awesome.min.css +4 -0
- data/app/assets/stylesheets/web_admin/font.css +18 -0
- data/app/assets/stylesheets/web_admin/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.svg +414 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-bold-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-light-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/landing.css +272 -0
- data/app/assets/stylesheets/web_admin/plugin.css +1132 -0
- data/app/assets/stylesheets/web_admin/style.css +613 -0
- data/app/assets/stylesheets/web_admin/style2.css +21 -0
- data/app/controllers/web_admin/albums_controller.rb +8 -0
- data/app/controllers/web_admin/application_controller.rb +10 -0
- data/app/controllers/web_admin/crud_controller.rb +61 -0
- data/app/controllers/web_admin/events_controller.rb +9 -0
- data/app/controllers/web_admin/images_controller.rb +8 -0
- data/app/controllers/web_admin/institutionals_controller.rb +8 -0
- data/app/controllers/web_admin/main_controller.rb +7 -0
- data/app/controllers/web_admin/posts_controller.rb +19 -0
- data/app/controllers/web_admin/users_controller.rb +15 -0
- data/app/controllers/web_admin/videos_controller.rb +8 -0
- data/app/enumerations/web_admin/permission_type.rb +5 -0
- data/app/enumerations/web_admin/user_type.rb +6 -0
- data/app/helpers/web_admin/application_helper.rb +20 -0
- data/app/models/ability.rb +14 -0
- data/app/models/ckeditor/asset.rb +7 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +7 -0
- data/app/models/web_admin/album.rb +13 -0
- data/app/models/web_admin/event.rb +20 -0
- data/app/models/web_admin/image.rb +10 -0
- data/app/models/web_admin/institutional.rb +11 -0
- data/app/models/web_admin/permission.rb +9 -0
- data/app/models/web_admin/post.rb +14 -0
- data/app/models/web_admin/user.rb +25 -0
- data/app/models/web_admin/video.rb +17 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +36 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +47 -0
- data/app/uploaders/web_admin/image_post_uploader.rb +55 -0
- data/app/uploaders/web_admin/image_uploader.rb +52 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +16 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/layouts/web_admin/devise.html.erb +42 -0
- data/app/views/shared/403.html +57 -0
- data/app/views/shared/_header.html.erb +16 -0
- data/app/views/shared/_navbar.html.erb +23 -0
- data/app/views/shared/_notice.html.erb +12 -0
- data/app/views/web_admin/albums/_form.html.erb +23 -0
- data/app/views/web_admin/albums/edit.html.erb +4 -0
- data/app/views/web_admin/albums/index.html.erb +39 -0
- data/app/views/web_admin/albums/new.html.erb +4 -0
- data/app/views/web_admin/albums/show.html.erb +4 -0
- data/app/views/web_admin/events/_form.html.erb +37 -0
- data/app/views/web_admin/events/edit.html.erb +4 -0
- data/app/views/web_admin/events/index.html.erb +39 -0
- data/app/views/web_admin/events/new.html.erb +4 -0
- data/app/views/web_admin/images/_form.html.erb +23 -0
- data/app/views/web_admin/images/_images.html.erb +10 -0
- data/app/views/web_admin/images/create.js.erb +2 -0
- data/app/views/web_admin/images/update.js.erb +2 -0
- data/app/views/web_admin/institutionals/_form.html.erb +22 -0
- data/app/views/web_admin/institutionals/edit.html.erb +4 -0
- data/app/views/web_admin/institutionals/index.html.erb +35 -0
- data/app/views/web_admin/institutionals/new.html.erb +4 -0
- data/app/views/web_admin/layouts/application.html.erb +77 -0
- data/app/views/web_admin/main/index.html.erb +1 -0
- data/app/views/web_admin/posts/_form.html.erb +27 -0
- data/app/views/web_admin/posts/edit.html.erb +4 -0
- data/app/views/web_admin/posts/index.html.erb +37 -0
- data/app/views/web_admin/posts/new.html.erb +4 -0
- data/app/views/web_admin/users/_form.html.erb +49 -0
- data/app/views/web_admin/users/edit.html.erb +4 -0
- data/app/views/web_admin/users/index.html.erb +35 -0
- data/app/views/web_admin/users/new.html.erb +4 -0
- data/app/views/web_admin/videos/_form.html.erb +22 -0
- data/app/views/web_admin/videos/edit.html.erb +4 -0
- data/app/views/web_admin/videos/index.html.erb +37 -0
- data/app/views/web_admin/videos/new.html.erb +4 -0
- data/bin/rails +12 -0
- data/config/initializers/ckeditor.rb +39 -0
- data/config/initializers/devise.rb +261 -0
- data/config/initializers/enumerate_it.rb +1 -0
- data/config/initializers/simple_form.rb +145 -0
- data/config/initializers/simple_form_bootstrap.rb +46 -0
- data/config/locales/buttons.yml +3 -0
- data/config/locales/controllers.yml +9 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/devise.pt.yml +62 -0
- data/config/locales/models.yml +54 -0
- data/config/locales/rails.yml +219 -0
- data/config/locales/responders.yml +10 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20141023223026_devise_create_admin_web_users.rb +42 -0
- data/db/migrate/20141023223656_create_admin_web_posts.rb +15 -0
- data/db/migrate/20141026181117_create_ckeditor_assets.rb +26 -0
- data/db/migrate/20141028020102_create_admin_web_institutionals.rb +10 -0
- data/db/migrate/20141028135201_create_admin_web_videos.rb +10 -0
- data/db/migrate/20141114020551_create_admin_web_albums.rb +12 -0
- data/db/migrate/20141117183405_create_admin_web_images.rb +11 -0
- data/db/migrate/20141130203155_add_user_type_to_users.rb +5 -0
- data/db/migrate/20141224221959_create_admin_web_events.rb +18 -0
- data/db/migrate/20150130140502_create_admin_web_permissions.rb +13 -0
- data/db/migrate/20150510191213_rename_tables.rb +12 -0
- data/lib/application_responder.rb +12 -0
- data/lib/tasks/web_admin_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/lib/web_admin/engine.rb +15 -0
- data/lib/web_admin/version.rb +3 -0
- data/lib/web_admin.rb +18 -0
- data/spec/factories/admin_web_users.rb +24 -0
- data/spec/features/admin_web/albums_spec.rb +74 -0
- data/spec/features/admin_web/event_spec.rb +85 -0
- data/spec/features/admin_web/institutionals_spec.rb +47 -0
- data/spec/features/admin_web/login_spec.rb +18 -0
- data/spec/features/admin_web/permissions_spec.rb +40 -0
- data/spec/features/admin_web/posts_spec.rb +55 -0
- data/spec/features/admin_web/users_spec.rb +73 -0
- data/spec/features/admin_web/videos_spec.rb +51 -0
- data/spec/fixtures/p3-single.jpg +0 -0
- data/spec/models/admin_web/album_spec.rb +20 -0
- data/spec/models/admin_web/event_spec.rb +42 -0
- data/spec/models/admin_web/image_spec.rb +14 -0
- data/spec/models/admin_web/institutional_spec.rb +19 -0
- data/spec/models/admin_web/permission_spec.rb +14 -0
- data/spec/models/admin_web/post_spec.rb +25 -0
- data/spec/models/admin_web/user_spec.rb +18 -0
- data/spec/models/admin_web/video_spec.rb +26 -0
- data/spec/rails_helper.rb +52 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/capybara.rb +53 -0
- data/spec/support/database_cleaner.rb +25 -0
- data/spec/support/devise.rb +5 -0
- data/spec/support/factory_girl.rb +4 -0
- data/spec/support/helpers.rb +82 -0
- data/spec/support/shared_connection.rb +10 -0
- data/spec/test_app/README.rdoc +28 -0
- data/spec/test_app/Rakefile +6 -0
- data/spec/test_app/app/assets/images/.keep +0 -0
- data/spec/test_app/app/assets/javascripts/application.js +13 -0
- data/spec/test_app/app/assets/stylesheets/application.css +15 -0
- data/spec/test_app/app/controllers/application_controller.rb +5 -0
- data/spec/test_app/app/controllers/concerns/.keep +0 -0
- data/spec/test_app/app/helpers/application_helper.rb +2 -0
- data/spec/test_app/app/mailers/.keep +0 -0
- data/spec/test_app/app/models/.keep +0 -0
- data/spec/test_app/app/models/concerns/.keep +0 -0
- data/spec/test_app/app/views/layouts/application.html.erb +14 -0
- data/spec/test_app/bin/bundle +3 -0
- data/spec/test_app/bin/rails +4 -0
- data/spec/test_app/bin/rake +4 -0
- data/spec/test_app/config/application.rb +29 -0
- data/spec/test_app/config/boot.rb +5 -0
- data/spec/test_app/config/database.yml +85 -0
- data/spec/test_app/config/environment.rb +5 -0
- data/spec/test_app/config/environments/development.rb +37 -0
- data/spec/test_app/config/environments/production.rb +78 -0
- data/spec/test_app/config/environments/test.rb +39 -0
- data/spec/test_app/config/initializers/assets.rb +8 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/test_app/config/initializers/inflections.rb +16 -0
- data/spec/test_app/config/initializers/mime_types.rb +4 -0
- data/spec/test_app/config/initializers/session_store.rb +3 -0
- data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/test_app/config/locales/en.yml +23 -0
- data/spec/test_app/config/routes.rb +4 -0
- data/spec/test_app/config/secrets.yml +22 -0
- data/spec/test_app/config.ru +4 -0
- data/spec/test_app/db/schema.rb +121 -0
- data/spec/test_app/lib/assets/.keep +0 -0
- data/spec/test_app/log/.keep +0 -0
- data/spec/test_app/public/404.html +67 -0
- data/spec/test_app/public/422.html +67 -0
- data/spec/test_app/public/500.html +66 -0
- data/spec/test_app/public/favicon.ico +0 -0
- data/spec/test_app/spec/factories/admin_web_albums.rb +7 -0
- data/spec/test_app/spec/factories/admin_web_users.rb +24 -0
- data/spec/test_app/spec/factories/permissions.rb +36 -0
- data/web_admin.gemspec +38 -0
- data/wercker.yml +16 -0
- metadata +530 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "panel-body"}) do |f| %>
|
2
|
+
<div class="block">
|
3
|
+
<%= f.label :email %><br />
|
4
|
+
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
|
5
|
+
</div>
|
6
|
+
<div class="block">
|
7
|
+
<%= f.label :password %><br />
|
8
|
+
<%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<%= render "devise/shared/links" %>
|
12
|
+
|
13
|
+
<%= f.submit I18n.t('buttons.signin'), class: "btn btn-info" %>
|
14
|
+
<div class="line line-dashed"></div>
|
15
|
+
|
16
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
10
|
+
<%= link_to I18n.t('devise.links.forgot_password'), new_password_path(resource_name), class: "pull-right m-t-mini" %>
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, autofocus: true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Resend unlock instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Web Admin - Administração de Web Sites</title>
|
5
|
+
<%= stylesheet_link_tag "web_admin/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "web_admin/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
|
12
|
+
<!-- header -->
|
13
|
+
<header id="header" class="navbar bg bg-black">
|
14
|
+
<a href="docs.html" class="btn btn-link pull-right m-t-mini"><i class="fa fa-question fa-lg text-default"></i></a>
|
15
|
+
<a class="navbar-brand" href="#">Web Admin</a>
|
16
|
+
</header>
|
17
|
+
<!-- / header -->
|
18
|
+
<section id="content">
|
19
|
+
<div class="main padder">
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-lg-4 col-lg-offset-4 m-t-large">
|
22
|
+
<section class="panel">
|
23
|
+
<header class="panel-heading text-center">
|
24
|
+
<h4>Acesso</h4>
|
25
|
+
</header>
|
26
|
+
<%= render 'shared/notice' %>
|
27
|
+
<%= yield %>
|
28
|
+
</section>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</section>
|
33
|
+
<!-- footer -->
|
34
|
+
<footer id="footer">
|
35
|
+
<div class="text-center padder clearfix">
|
36
|
+
<p>
|
37
|
+
<small>© first 2013, Mobile first web app framework base on Bootstrap</small><br><br>
|
38
|
+
</p>
|
39
|
+
</div>
|
40
|
+
</footer>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/500.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>Você não tem acesso a essa página.</h1>
|
54
|
+
</div>
|
55
|
+
<p>Contate o administrador do sistema, para maiores informações.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<ul class="nav navbar-nav navbar-avatar pull-right">
|
2
|
+
<li class="dropdown">
|
3
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
4
|
+
<span class="hidden-xs-only"><%= current_user %></span>
|
5
|
+
<b class="caret hidden-xs-only"></b>
|
6
|
+
</a>
|
7
|
+
<ul class="dropdown-menu pull-right">
|
8
|
+
<li><%= link_to "Dados pessoais", user_path(current_user) %></li>
|
9
|
+
<li><%= link_to "Sair", destroy_user_session_path, method: :delete %></li>
|
10
|
+
</ul>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
<a class="navbar-brand" href="#">Admin</a>
|
14
|
+
<button type="button" class="btn btn-link pull-left nav-toggle visible-xs" data-toggle="class:slide-nav slide-nav-left" data-target="body">
|
15
|
+
<i class="fa fa-bars fa-lg text-default"></i>
|
16
|
+
</button>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<nav id="nav" class="nav-primary hidden-xs nav-vertical">
|
2
|
+
<ul class="nav" data-spy="affix" data-offset-top="50">
|
3
|
+
<li class="active"><a href="index.html"><i class="fa fa-dashboard fa-lg"></i><span>Dashboard</span></a></li>
|
4
|
+
<% if can? :read, WebAdmin::Post %>
|
5
|
+
<%= menu_link I18n.t('controllers.web_admin/posts'), 'fa fa-file-text-o fa-lg', 'posts', posts_path %>
|
6
|
+
<% end %>
|
7
|
+
<% if can? :read, WebAdmin::Institutional %>
|
8
|
+
<%= menu_link I18n.t('controllers.web_admin/institutionals'), 'fa fa-file-text-o fa-lg', 'institutionals',institutionals_path %>
|
9
|
+
<% end %>
|
10
|
+
<% if can? :read, WebAdmin::Video %>
|
11
|
+
<%= menu_link I18n.t('controllers.web_admin/videos'), 'fa fa-video-camera fa-lg', 'videos', videos_path %>
|
12
|
+
<% end %>
|
13
|
+
<% if can? :read, WebAdmin::Album %>
|
14
|
+
<%= menu_link I18n.t('controllers.web_admin/albums'), 'fa fa-camera fa-lg', 'albums', albums_path %>
|
15
|
+
<% end %>
|
16
|
+
<% if can? :read, WebAdmin::Event %>
|
17
|
+
<%= menu_link I18n.t('controllers.web_admin/events'), 'fa fa-calendar fa-lg', 'events', events_path %>
|
18
|
+
<% end %>
|
19
|
+
<% if can? :read, WebAdmin::User %>
|
20
|
+
<%= menu_link I18n.t('controllers.web_admin/users'), 'fa fa-user fa-lg', 'users', users_path %>
|
21
|
+
<% end %>
|
22
|
+
</ul>
|
23
|
+
</nav>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% unless flash.empty? %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-lg-12">
|
4
|
+
<% flash.each do |name, msg| %>
|
5
|
+
<div data-alert class="alert <%= name == :notice ? "alert-success" : "alert-danger" %>">
|
6
|
+
<a class="close" data-dismiss="alert">×</a>
|
7
|
+
<%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal", role: "form"} do |f| %>
|
6
|
+
|
7
|
+
<%= f.input :title %>
|
8
|
+
<%= f.input :local %>
|
9
|
+
<%= f.input :date, as: :string, :input_html => { class: "datepicker", data: { "date-format" => "dd/mm/yyyy" }} %>
|
10
|
+
|
11
|
+
<hr>
|
12
|
+
<div class="form-actions">
|
13
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
14
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
15
|
+
<%= link_to "Adicionar imagens", @object, class: 'btn btn-primary' if f.object.persisted? %>
|
16
|
+
<%= link_to 'Cancelar', albums_path, class: 'btn btn-primary' %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
</div>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de álbuns</h4>
|
4
|
+
|
5
|
+
<% if can? :create, WebAdmin::Album %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Novo', new_album_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Título</td>
|
16
|
+
<td>Data</td>
|
17
|
+
<td>Local</td>
|
18
|
+
<td>Criado em</td>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
|
22
|
+
<tbody>
|
23
|
+
<% @albums.each do |album| %>
|
24
|
+
<tr>
|
25
|
+
<td><%= link_to album.title, edit_album_path(album) %></td>
|
26
|
+
<td><%= I18n.l album.date %></td>
|
27
|
+
<td><%= album.local %></td>
|
28
|
+
<td><%= I18n.l album.created_at, format: :only_date %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="col-md-4 box">
|
37
|
+
<h4>Pesquisa</h4>
|
38
|
+
</div>
|
39
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal", role: "form"} do |f| %>
|
6
|
+
|
7
|
+
<%= f.input :title, input_html: { class: 'col-md-8' } %>
|
8
|
+
|
9
|
+
<%= f.input :start_date, as: :string, :input_html => { class: "datetime" } %>
|
10
|
+
|
11
|
+
<%= f.input :end_date, as: :string, :input_html => { class: "datetime" } %>
|
12
|
+
|
13
|
+
<%= f.input :description %>
|
14
|
+
|
15
|
+
<%= f.input :zipcode %>
|
16
|
+
|
17
|
+
<%= f.input :street %>
|
18
|
+
|
19
|
+
<%= f.input :number %>
|
20
|
+
|
21
|
+
<%= f.input :neighborhood %>
|
22
|
+
|
23
|
+
<%= f.input :city %>
|
24
|
+
|
25
|
+
<%= f.input :state %>
|
26
|
+
<hr>
|
27
|
+
<div class="form-actions">
|
28
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
29
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
30
|
+
<%= link_to 'Cancelar', events_path, class: 'btn btn-primary' %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
</div>
|
37
|
+
</div>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de eventos</h4>
|
4
|
+
|
5
|
+
<%if can? :create, WebAdmin::Event %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Novo', new_event_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Título</td>
|
16
|
+
<td>Início às</td>
|
17
|
+
<td>Término às</td>
|
18
|
+
<td>Criado em</td>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
|
22
|
+
<tbody>
|
23
|
+
<% @events.each do |event| %>
|
24
|
+
<tr>
|
25
|
+
<td><%= link_to event.title, edit_event_path(event) %></td>
|
26
|
+
<td><%= I18n.l event.start_date %></td>
|
27
|
+
<td><%= I18n.l event.end_date %></td>
|
28
|
+
<td><%= I18n.l event.created_at, format: :only_date %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="col-md-4 box">
|
37
|
+
<h4>Pesquisa</h4>
|
38
|
+
</div>
|
39
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<div class="row images">
|
6
|
+
<%= render 'web_admin/images/images', album: @album %>
|
7
|
+
</div>
|
8
|
+
<script id="template-upload" type="text/x-tmpl">
|
9
|
+
<div class="upload">
|
10
|
+
{%=o.name%}
|
11
|
+
<div class="progress"><div class="bar" style="width: 0%; background-color: green;"> </div></div>
|
12
|
+
</div>
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<%= simple_form_for WebAdmin::Image.new, html: { class: "form-horizontal", role: "form", multipart: true} do |f| %>
|
16
|
+
<%= f.input :album_id, as: :hidden, input_html: { value: @album.id } %>
|
17
|
+
<%= f.input :file, as: :file, label: false, :input_html => { class: "filestyle", multiple: true } %>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% album.images.order("id asc").in_groups_of(6, false).each do |image_group| %>
|
2
|
+
<% image_group.each do |image| %>
|
3
|
+
<div class="col-md-2">
|
4
|
+
<span><%= flash[:notice] %></span><br />
|
5
|
+
<%= image_tag image.file.url(:thumb_admin) %><br />
|
6
|
+
<%= check_box_tag :cover, image.id, image.cover?, class: "cover" %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal", role: "form"} do |f| %>
|
6
|
+
|
7
|
+
<%= f.input :name %>
|
8
|
+
|
9
|
+
<%= f.input :body, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} } %>
|
10
|
+
|
11
|
+
<hr>
|
12
|
+
<div class="form-actions">
|
13
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
14
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
15
|
+
<%= link_to 'Cancelar', institutionals_path, class: 'btn btn-primary' %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de institucionais</h4>
|
4
|
+
|
5
|
+
<% if can? :create, WebAdmin::Institutional %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Novo', new_institutional_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Título</td>
|
16
|
+
<td>Criado em</td>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
|
20
|
+
<tbody>
|
21
|
+
<% @institutionals.each do |institutional| %>
|
22
|
+
<tr>
|
23
|
+
<td><%= link_to institutional.name, edit_institutional_path(institutional) %></td>
|
24
|
+
<td><%= I18n.l institutional.created_at, format: :only_date %></td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="col-md-4 box">
|
33
|
+
<h4>Pesquisa</h4>
|
34
|
+
</div>
|
35
|
+
</div>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>WebAdmin</title>
|
5
|
+
<%= stylesheet_link_tag "web_admin/application", media: "all" %>
|
6
|
+
<%= csrf_meta_tags %>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<!-- header -->
|
10
|
+
<header id="header" class="navbar">
|
11
|
+
<%= render 'shared/header' %>
|
12
|
+
</header>
|
13
|
+
<!-- / header -->
|
14
|
+
<!-- nav -->
|
15
|
+
<%= render 'shared/navbar' %>
|
16
|
+
<!-- / nav -->
|
17
|
+
<section id="content">
|
18
|
+
<section class="main padder">
|
19
|
+
<div class="row">
|
20
|
+
<div class="col-lg-12">
|
21
|
+
<%= render 'shared/notice' %>
|
22
|
+
<section>
|
23
|
+
<%= yield %>
|
24
|
+
</section>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
</section>
|
29
|
+
</section>
|
30
|
+
<!-- .modal -->
|
31
|
+
<div id="modal" class="modal fade">
|
32
|
+
<form class="m-b-none">
|
33
|
+
<div class="modal-dialog">
|
34
|
+
<div class="modal-content">
|
35
|
+
<div class="modal-header">
|
36
|
+
<button type="button" class="close" data-dismiss="modal"><i class="fa fa-times"></i></button>
|
37
|
+
<h4 class="modal-title" id="myModalLabel">Post your first idea</h4>
|
38
|
+
</div>
|
39
|
+
<div class="modal-body">
|
40
|
+
<div class="block">
|
41
|
+
<label class="control-label">Title</label>
|
42
|
+
<input type="text" class="form-control" placeholder="Post title">
|
43
|
+
</div>
|
44
|
+
<div class="block">
|
45
|
+
<label class="control-label">Content</label>
|
46
|
+
<textarea class="form-control" placeholder="Content" rows="5"></textarea>
|
47
|
+
</div>
|
48
|
+
<div class="checkbox">
|
49
|
+
<label>
|
50
|
+
<input type="checkbox"> Share with all memebers of first
|
51
|
+
</label>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<div class="modal-footer">
|
55
|
+
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">Save</button>
|
56
|
+
<button type="button" class="btn btn-sm btn-primary" data-loading-text="Publishing...">Publish</button>
|
57
|
+
</div>
|
58
|
+
</div><!-- /.modal-content -->
|
59
|
+
</div>
|
60
|
+
</form>
|
61
|
+
</div>
|
62
|
+
<!-- / .modal -->
|
63
|
+
<!-- footer -->
|
64
|
+
<footer id="footer">
|
65
|
+
<div class="text-center padder clearfix">
|
66
|
+
<p>
|
67
|
+
<small>© WebAdmin 2014, Administração de sites</small><br><br>
|
68
|
+
<a href="#" class="btn btn-xs btn-circle btn-twitter"><i class="fa fa-twitter"></i></a>
|
69
|
+
<a href="#" class="btn btn-xs btn-circle btn-facebook"><i class="fa fa-facebook"></i></a>
|
70
|
+
<a href="#" class="btn btn-xs btn-circle btn-gplus"><i class="fa fa-google-plus"></i></a>
|
71
|
+
</p>
|
72
|
+
</div>
|
73
|
+
</footer>
|
74
|
+
<a href="#" class="hide slide-nav-block" data-toggle="class:slide-nav slide-nav-left" data-target="body"></a>
|
75
|
+
</body>
|
76
|
+
<%= javascript_include_tag "web_admin/application" %>
|
77
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Bem vindo!</h1>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal"} do |f| %>
|
6
|
+
<fieldset>
|
7
|
+
<%= f.input :title %>
|
8
|
+
|
9
|
+
<%= f.input :abstract %>
|
10
|
+
|
11
|
+
<%= f.input :image, class: "form-control" %>
|
12
|
+
|
13
|
+
<%= f.input :body, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} } %>
|
14
|
+
|
15
|
+
</fieldset>
|
16
|
+
|
17
|
+
<hr>
|
18
|
+
<div class="form-actions">
|
19
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
20
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
21
|
+
<%= link_to 'Cancelar', posts_path, class: 'btn btn-primary' %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de notícias</h4>
|
4
|
+
|
5
|
+
<% if can? :create, WebAdmin::Post %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Nova', new_post_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Título</td>
|
16
|
+
<td>Criado por</td>
|
17
|
+
<td>Criado em</td>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
|
21
|
+
<tbody>
|
22
|
+
<% @posts.each do |post| %>
|
23
|
+
<tr>
|
24
|
+
<td><%= link_to post.title, edit_post_path(post) %></td>
|
25
|
+
<td><%= post.user %></td>
|
26
|
+
<td><%= I18n.l post.created_at, format: :only_date %></td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="col-md-4 box">
|
35
|
+
<h4>Pesquisa</h4>
|
36
|
+
</div>
|
37
|
+
</div>
|