mix-rails 0.26.1 → 0.26.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/MIX_RAILS_VERSION +1 -1
  3. data/admix/app/assets/javascripts/admix/application.js.coffee +1 -8
  4. data/admix/app/views/admix/inherited/_actions.haml +2 -1
  5. data/admix/lib/admix/version.rb +1 -1
  6. data/mix-rails-addresses/app/models/address.rb +1 -1
  7. data/mix-rails-addresses/lib/mix-rails-addresses/version.rb +1 -1
  8. data/mix-rails-albums/lib/mix-rails-albums/version.rb +1 -1
  9. data/mix-rails-auth/app/models/role.rb +3 -0
  10. data/mix-rails-auth/app/models/user.rb +1 -0
  11. data/mix-rails-auth/lib/mix-rails-auth/version.rb +1 -1
  12. data/mix-rails-contact-us/app/controllers/contacts_controller.rb +19 -0
  13. data/mix-rails-contact-us/app/models/contact.rb +17 -0
  14. data/mix-rails-contact-us/app/views/contacts/show.haml +24 -0
  15. data/mix-rails-contact-us/app/views/templates/contacts/show.haml +1 -0
  16. data/mix-rails-contact-us/config/locales/contact.pt-BR.yml +7 -0
  17. data/mix-rails-contact-us/config/routes.rb +7 -0
  18. data/mix-rails-contact-us/lib/mix-rails-contact-us/version.rb +1 -1
  19. data/mix-rails-core/app/assets/javascripts/inputs_masks.coffee +7 -0
  20. data/mix-rails-core/app/authorizers/application_authorizer.rb +3 -1
  21. data/mix-rails-core/db/migrate/20130313020623_acts_as_taggable_on_migration.rb +30 -0
  22. data/mix-rails-core/lib/mix-rails-core.rb +1 -0
  23. data/mix-rails-core/lib/mix-rails-core/version.rb +1 -1
  24. data/mix-rails-settings/db/seeds.rb +2 -0
  25. data/mix-rails-settings/lib/mix-rails-settings/version.rb +1 -1
  26. data/mix-rails-songs/lib/mix-rails-songs/version.rb +1 -1
  27. data/mix-rails-videos/lib/mix-rails-videos/version.rb +1 -1
  28. data/mix-rails-wireframe/app/helpers/wireframe_helper.rb +0 -8
  29. data/mix-rails-wireframe/app/views/layouts/wireframe.haml +6 -3
  30. data/mix-rails-wireframe/lib/mix-rails-wireframe/version.rb +1 -1
  31. data/mix-rails-writer/app/authorizers/blog_authorizer.rb +3 -0
  32. data/mix-rails-writer/app/controllers/admix/blogs_controller.rb +3 -0
  33. data/mix-rails-writer/app/models/blog.rb +20 -0
  34. data/mix-rails-writer/app/views/admix/blogs/_form_config.haml +11 -0
  35. data/mix-rails-writer/app/views/admix/blogs/_grid_columns.haml +4 -0
  36. data/mix-rails-writer/app/views/admix/blogs/_show.html.haml +9 -0
  37. data/mix-rails-writer/db/migrate/20130313021054_create_blogs.rb +14 -0
  38. data/mix-rails-writer/lib/mix-rails-writer/engine.rb +8 -0
  39. data/mix-rails-writer/lib/mix-rails-writer/version.rb +1 -1
  40. data/mix-rails-writer/spec/models/blog_spec.rb +5 -0
  41. data/version.rb +1 -1
  42. metadata +39 -36
  43. data/admix/app/controllers/admix/rest_controller.rb +0 -46
  44. data/admix/app/views/admix/rest/_actions.haml +0 -7
  45. data/admix/app/views/admix/rest/_column_actions.haml +0 -3
  46. data/admix/app/views/admix/rest/_empty_grid.haml +0 -3
  47. data/admix/app/views/admix/rest/_form_config.haml +0 -0
  48. data/admix/app/views/admix/rest/_grid.haml +0 -5
  49. data/admix/app/views/admix/rest/_grid_actions.haml +0 -1
  50. data/admix/app/views/admix/rest/_grid_columns.haml +0 -11
  51. data/admix/app/views/admix/rest/edit.html.haml +0 -5
  52. data/admix/app/views/admix/rest/form.html.haml +0 -50
  53. data/admix/app/views/admix/rest/index.html.haml +0 -3
  54. data/admix/app/views/admix/rest/new.html.haml +0 -3
  55. data/admix/app/views/admix/rest/show.html.haml +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6df673a7110a5d4f986cc49e7a707c650d4d207c
4
- data.tar.gz: ac9736702baaa5611de8944ae4b7befc8d620869
3
+ metadata.gz: 7b8e8ff4709dbd1e5dd88133f5a2f08e7a73faa3
4
+ data.tar.gz: bc4de89c2595dfd89c6936418a72d2c98221ea8d
5
5
  SHA512:
6
- metadata.gz: 0cdd255a3b65b82d442f6d225493f2809c7a66c9dbd73339d0564b4e23249454eaf3f9bf4ec688df3d7f30c122ed12475324529418e0a2f7ad05ce0494fc738e
7
- data.tar.gz: b2b181b025c0d35560ed89cbb7c68bb24e4274b1f8e65ea04aac70d926df4e21b0190de995e9b3be90a0ccf998140aff9d4e500965dd173789658753ec766238
6
+ metadata.gz: 0873ff717857387ec89dc92784b87298826b352b0034be3faa9c8fa5b7f08e183bfedd56bf38f9a8bd164d30d3be586742cf30f4b8d0b58e3553f33d4f6f4fd7
7
+ data.tar.gz: 3bc87fb45864d97496ac632f11e7d46c6eeed8a9397173436f9279fee8f8660b26c97ce986fe2a8a89e51ddec3dc5ec5215bffdb402b97409f38d1b936439cf8
@@ -1 +1 @@
1
- 0.26.1
1
+ 0.26.2
@@ -15,12 +15,11 @@
15
15
  #= require jquery.qtip.js
16
16
  #= require jquery.globalmoney
17
17
  #= require ckeditor/init
18
- #= require jquery.meio.mask.min
19
18
  #= require jquery.ui.addresspicker
20
-
21
19
  #= require angular.min
22
20
  #= require angular-ui.min
23
21
  #= require gmaps
22
+ #= require inputs_masks
24
23
 
25
24
 
26
25
  Backbone.emulateHTTP = true
@@ -54,12 +53,6 @@ $ ->
54
53
  dateFormat: "dd/mm/yy"
55
54
  altField: $(this).next()
56
55
 
57
- $(".cell, .phone").livequery ->
58
- $(@).setMask('(84) 9999-9999')
59
-
60
- $(".cep").livequery ->
61
- $(@).setMask('99999-999')
62
-
63
56
  # window.admix = angular.module('admix', ['ui'])
64
57
  # .config(["$httpProvider", function(provider) {
65
58
  # provider.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content');
@@ -1,5 +1,6 @@
1
1
  .well
2
- = link_to "#{t('admix.crud.new.link')} " + t("#{@collection_name}.#{@collection_name.singularize}"), new_resource_url, class: 'btn'
2
+ - if not ['new'].include? params[:action]
3
+ = link_to "#{t('admix.crud.new.link')} " + t("#{@collection_name}.#{@collection_name.singularize}"), new_resource_url, class: 'btn'
3
4
  = link_to t('admix.crud.list.title', resources: t("#{@collection_name}.#{@collection_name}")), collection_url, class: 'btn'
4
5
  - if not ['index', 'edit'].include? params[:action]
5
6
  - if not resource.nil? and not resource.new_record?
@@ -2,7 +2,7 @@ module Admix
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -2,7 +2,7 @@ class Address < ActiveRecord::Base
2
2
  belongs_to :city
3
3
  delegate :state, :to => :city, :allow_nil => true
4
4
  belongs_to :addressable, polymorphic: true
5
- attr_accessible :address, :complement, :description, :district, :number, :zipcode, :latitude, :longitude
5
+ attr_accessible :address, :complement, :description, :district, :number, :zipcode, :latitude, :longitude, :city_id
6
6
 
7
7
 
8
8
  def to_s
@@ -2,7 +2,7 @@ module MixRailsAddresses
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -2,7 +2,7 @@ module MixRailsAlbums
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -3,4 +3,7 @@ class Role < ActiveRecord::Base
3
3
  belongs_to :resource, :polymorphic => true
4
4
 
5
5
  scopify
6
+
7
+ attr_accessible :name, :user_ids
8
+
6
9
  end
@@ -1,5 +1,6 @@
1
1
  class User < ActiveRecord::Base
2
2
  rolify
3
+ include Authority::UserAbilities
3
4
  # Include default devise modules. Others available are:
4
5
  # :token_authenticatable, :confirmable,
5
6
  # :lockable, :timeoutable and :omniauthable
@@ -2,7 +2,7 @@ module MixRailsAuth
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -0,0 +1,19 @@
1
+ class ContactsController < ApplicationController
2
+
3
+ def show
4
+ @form = Contact.new
5
+ end
6
+
7
+ def create
8
+ @form = Contact.new(params[:contact])
9
+
10
+ if @form.valid?
11
+ @form.deliver
12
+ redirect_to contact_path, notice: t('contact.notice.success')
13
+ else
14
+ flash[:warn] = t('contact.notice.error')
15
+ render 'show'
16
+ end
17
+ end
18
+
19
+ end
@@ -0,0 +1,17 @@
1
+ class Contact < MailForm::Base
2
+
3
+ attribute :name, validate: true
4
+ attribute :email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
5
+ attribute :subject
6
+ attribute :phone
7
+ attribute :message, validate: true
8
+
9
+ def headers
10
+ {
11
+ to: Setting.app_email,
12
+ subject: "Contato via site #{Setting.app_title}",
13
+ from: %("#{name}" <#{email}>)
14
+ }
15
+ end
16
+
17
+ end
@@ -0,0 +1,24 @@
1
+ - content_for :contact_content do
2
+ - if flash[:notice]
3
+ .alert.alert-success
4
+ = flash[:notice]
5
+ - if flash[:warn]
6
+ .alert.alert-warn
7
+ = flash[:warn]
8
+ = simple_form_for @form, url: contact_path do |f|
9
+ .row-fluid
10
+ .span12
11
+ = f.input :name, input_html: {class: 'span24'}
12
+ .span12
13
+ = f.input :email, input_html: {class: 'span24'}
14
+ .row-fluid
15
+ .span12
16
+ = f.input :phone, as: 'phone', input_html: {class: 'span24'}
17
+ .span12
18
+ = f.input :subject, input_html: {class: 'span24'}
19
+ .row-fluid
20
+ .span24
21
+ = f.input :message, as: :text, input_html: {class: 'span24'}
22
+ .ta-r
23
+ %button{:type => "sumit"} Enviar
24
+ = render template: 'templates/contacts/show'
@@ -0,0 +1 @@
1
+ = content_for(:contact_content)
@@ -0,0 +1,7 @@
1
+ pt-BR:
2
+ resource:
3
+ contact: "contato"
4
+ contact:
5
+ notice:
6
+ success: "Email enviado com sucesso"
7
+ error: "Por favor, corrija os erros abaixo"
@@ -1,2 +1,9 @@
1
1
  Rails.application.routes.draw do
2
+
3
+ localized do
4
+ resource :contact, only: [:show, :create]
5
+ end
6
+
7
+ # get '/contato' => "contact#index", as: 'contact'
8
+ # post '/contato' => "contact#send_mail"
2
9
  end
@@ -2,7 +2,7 @@ module MixRailsContactUs
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -0,0 +1,7 @@
1
+ #= require jquery/jquery.livequery
2
+ #= require jquery.meio.mask.min
3
+ $(".cell, .phone").livequery ->
4
+ $(@).setMask('(84) 9999-9999')
5
+
6
+ $(".cep").livequery ->
7
+ $(@).setMask('99999-999')
@@ -10,7 +10,9 @@ class ApplicationAuthorizer < Authority::Authorizer
10
10
  def self.default(adjective, user)
11
11
  # 'Whitelist' strategy for security: anything not explicitly allowed is
12
12
  # considered forbidden.
13
- false
13
+
14
+ # default was false
15
+ user.has_role? :admin
14
16
  end
15
17
 
16
18
  end
@@ -0,0 +1,30 @@
1
+ class ActsAsTaggableOnMigration < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :tags do |t|
4
+ t.string :name
5
+ end
6
+
7
+ create_table :taggings do |t|
8
+ t.references :tag
9
+
10
+ # You should make sure that the column created is
11
+ # long enough to store the required class names.
12
+ t.references :taggable, :polymorphic => true
13
+ t.references :tagger, :polymorphic => true
14
+
15
+ # Limit is created to prevent MySQL error on index
16
+ # length for MyISAM table type: http://bit.ly/vgW2Ql
17
+ t.string :context, :limit => 128
18
+
19
+ t.datetime :created_at
20
+ end
21
+
22
+ add_index :taggings, :tag_id
23
+ add_index :taggings, [:taggable_id, :taggable_type, :context]
24
+ end
25
+
26
+ def self.down
27
+ drop_table :taggings
28
+ drop_table :tags
29
+ end
30
+ end
@@ -23,6 +23,7 @@ require 'default_value_for'
23
23
  require 'haml-rails'
24
24
  require 'ckeditor'
25
25
  require 'active_menu'
26
+ require 'acts-as-taggable-on'
26
27
 
27
28
  module MixRailsCore
28
29
  end
@@ -2,7 +2,7 @@ module MixRailsCore
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -0,0 +1,2 @@
1
+ Setting.create({name: 'Application title', key: 'app_title', value: 'Mix-Rails', activated: true, system: true})
2
+ Setting.create({name: 'Application e-mail', key: 'app_email', value: 'mixrails@example.com', activated: true, system: true})
@@ -2,7 +2,7 @@ module MixRailsSettings
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -2,7 +2,7 @@ module MixRailsSongs
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -2,7 +2,7 @@ module MixRailsVideos
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -1,12 +1,4 @@
1
1
  module WireframeHelper
2
2
  extend CoreHelper
3
3
 
4
- def frame_for_breadcrumbs
5
- content_for?(:breadcrumbs) ? content_for(:breadcrumbs) : breadcrumbs.render(class: 'breadcrumb')
6
- end
7
-
8
- def frame_for_footer
9
- content_for?(:footer) ? content_for(:footer) : "Footer"
10
- end
11
-
12
4
  end
@@ -7,8 +7,11 @@
7
7
  = csrf_meta_tags
8
8
  %body
9
9
  .container
10
- = frame_for_breadcrumbs
10
+ = content_for?(:breadcrumbs) ? content_for(:breadcrumbs) : breadcrumbs.render(class: 'breadcrumb')
11
11
  .container
12
- = yield
12
+ - if content_for? :content
13
+ = content_for :content
14
+ - else
15
+ = yield
13
16
  %footer.container
14
- = frame_for_footer
17
+ = content_for?(:footer) ? content_for(:footer) : "Footer"
@@ -2,7 +2,7 @@ module MixRailsWireframe
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -0,0 +1,3 @@
1
+ class BlogAuthorizer < ApplicationAuthorizer
2
+ def
3
+ end
@@ -0,0 +1,3 @@
1
+ class Admix::BlogsController < Admix::InheritedController
2
+
3
+ end
@@ -0,0 +1,20 @@
1
+ class Blog < ActiveRecord::Base
2
+ extend FriendlyId
3
+ include Authority::Abilities
4
+
5
+ resourcify
6
+
7
+ self.authorizer_name = 'BlogAuthorizer'
8
+
9
+ belongs_to :user
10
+ attr_accessible :description, :name, :slug
11
+
12
+ validates_presence_of :name, :user
13
+
14
+ friendly_id :name, use: :slugged
15
+
16
+ acts_as_taggable
17
+
18
+
19
+
20
+ end
@@ -0,0 +1,11 @@
1
+ - admix_tab t('blogs.blog') do |t|
2
+ -t.tab_content do
3
+ = f.input :name as: 'string', input_html: {class: 'span12'}
4
+ = f.input :description, as: 'ckeditor', input_html: { ckeditor: {toolbar: 'Full'} }
5
+ = f.association :user
6
+
7
+ - content_for :form_options do
8
+ = f.input :status, input_html: {class: 'span12'}
9
+
10
+
11
+
@@ -0,0 +1,4 @@
1
+ - grid.column name: input_label(:defaults, :name), attribute: 'name' do |obj|
2
+ - obj.title
3
+
4
+ - column_actions(grid)
@@ -0,0 +1,9 @@
1
+ %dl
2
+ %dt= t('posts.title')
3
+ %dd= resource.title
4
+ %dt= t('posts.date')
5
+ %dd= resource.date.strftime("%d/%m/%Y")
6
+ %dt= t('posts.content')
7
+ %dd= raw resource.content
8
+ %dt= t('posts.source')
9
+ %dd= resource.source
@@ -0,0 +1,14 @@
1
+ class CreateBlogs < ActiveRecord::Migration
2
+ def change
3
+ create_table :blogs do |t|
4
+ t.string :name
5
+ t.text :description
6
+ t.references :user
7
+ t.string :slug
8
+
9
+ t.timestamps
10
+ end
11
+ add_index :blogs, :user_id
12
+ add_index :blogs, :slug
13
+ end
14
+ end
@@ -9,10 +9,18 @@ module MixRailsWriter
9
9
  initializer "mix-rails-writer.setup_menu", after: "admix.setup_menu" do
10
10
  ActiveMenu::get('admix-nav') do |nav|
11
11
  nav.get(:content) do |content|
12
+
12
13
  content.child :news do |news|
13
14
  news.text Proc.new {t('news.news')}
14
15
  news.href Proc.new {admix_news_index_url}
15
16
  end
17
+
18
+ content.child :blogs do |blogs|
19
+ blogs.text Proc.new {t('blogs.blogs')}
20
+ blogs.href Proc.new {admix_news_index_url}
21
+ blogs.visible Proc.new {current_user.can_manage?(Blog)}
22
+ end
23
+
16
24
  end
17
25
  end
18
26
  end
@@ -2,7 +2,7 @@ module MixRailsWriter
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Blog do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
data/version.rb CHANGED
@@ -2,7 +2,7 @@ module MixRailsCore
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 26
5
- TINY = 1
5
+ TINY = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mix-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadjow Leão
@@ -268,154 +268,154 @@ dependencies:
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 0.26.1
271
+ version: 0.26.2
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 0.26.1
278
+ version: 0.26.2
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: mix-rails-auth
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - '='
284
284
  - !ruby/object:Gem::Version
285
- version: 0.26.1
285
+ version: 0.26.2
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - '='
291
291
  - !ruby/object:Gem::Version
292
- version: 0.26.1
292
+ version: 0.26.2
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: admix
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - '='
298
298
  - !ruby/object:Gem::Version
299
- version: 0.26.1
299
+ version: 0.26.2
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - '='
305
305
  - !ruby/object:Gem::Version
306
- version: 0.26.1
306
+ version: 0.26.2
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: mix-rails-settings
309
309
  requirement: !ruby/object:Gem::Requirement
310
310
  requirements:
311
311
  - - '='
312
312
  - !ruby/object:Gem::Version
313
- version: 0.26.1
313
+ version: 0.26.2
314
314
  type: :runtime
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
318
  - - '='
319
319
  - !ruby/object:Gem::Version
320
- version: 0.26.1
320
+ version: 0.26.2
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: mix-rails-wireframe
323
323
  requirement: !ruby/object:Gem::Requirement
324
324
  requirements:
325
325
  - - '='
326
326
  - !ruby/object:Gem::Version
327
- version: 0.26.1
327
+ version: 0.26.2
328
328
  type: :runtime
329
329
  prerelease: false
330
330
  version_requirements: !ruby/object:Gem::Requirement
331
331
  requirements:
332
332
  - - '='
333
333
  - !ruby/object:Gem::Version
334
- version: 0.26.1
334
+ version: 0.26.2
335
335
  - !ruby/object:Gem::Dependency
336
336
  name: mix-rails-contact-us
337
337
  requirement: !ruby/object:Gem::Requirement
338
338
  requirements:
339
339
  - - '='
340
340
  - !ruby/object:Gem::Version
341
- version: 0.26.1
341
+ version: 0.26.2
342
342
  type: :runtime
343
343
  prerelease: false
344
344
  version_requirements: !ruby/object:Gem::Requirement
345
345
  requirements:
346
346
  - - '='
347
347
  - !ruby/object:Gem::Version
348
- version: 0.26.1
348
+ version: 0.26.2
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: mix-rails-addresses
351
351
  requirement: !ruby/object:Gem::Requirement
352
352
  requirements:
353
353
  - - '='
354
354
  - !ruby/object:Gem::Version
355
- version: 0.26.1
355
+ version: 0.26.2
356
356
  type: :runtime
357
357
  prerelease: false
358
358
  version_requirements: !ruby/object:Gem::Requirement
359
359
  requirements:
360
360
  - - '='
361
361
  - !ruby/object:Gem::Version
362
- version: 0.26.1
362
+ version: 0.26.2
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: mix-rails-writer
365
365
  requirement: !ruby/object:Gem::Requirement
366
366
  requirements:
367
367
  - - '='
368
368
  - !ruby/object:Gem::Version
369
- version: 0.26.1
369
+ version: 0.26.2
370
370
  type: :runtime
371
371
  prerelease: false
372
372
  version_requirements: !ruby/object:Gem::Requirement
373
373
  requirements:
374
374
  - - '='
375
375
  - !ruby/object:Gem::Version
376
- version: 0.26.1
376
+ version: 0.26.2
377
377
  - !ruby/object:Gem::Dependency
378
378
  name: mix-rails-albums
379
379
  requirement: !ruby/object:Gem::Requirement
380
380
  requirements:
381
381
  - - '='
382
382
  - !ruby/object:Gem::Version
383
- version: 0.26.1
383
+ version: 0.26.2
384
384
  type: :runtime
385
385
  prerelease: false
386
386
  version_requirements: !ruby/object:Gem::Requirement
387
387
  requirements:
388
388
  - - '='
389
389
  - !ruby/object:Gem::Version
390
- version: 0.26.1
390
+ version: 0.26.2
391
391
  - !ruby/object:Gem::Dependency
392
392
  name: mix-rails-videos
393
393
  requirement: !ruby/object:Gem::Requirement
394
394
  requirements:
395
395
  - - '='
396
396
  - !ruby/object:Gem::Version
397
- version: 0.26.1
397
+ version: 0.26.2
398
398
  type: :runtime
399
399
  prerelease: false
400
400
  version_requirements: !ruby/object:Gem::Requirement
401
401
  requirements:
402
402
  - - '='
403
403
  - !ruby/object:Gem::Version
404
- version: 0.26.1
404
+ version: 0.26.2
405
405
  - !ruby/object:Gem::Dependency
406
406
  name: mix-rails-songs
407
407
  requirement: !ruby/object:Gem::Requirement
408
408
  requirements:
409
409
  - - '='
410
410
  - !ruby/object:Gem::Version
411
- version: 0.26.1
411
+ version: 0.26.2
412
412
  type: :runtime
413
413
  prerelease: false
414
414
  version_requirements: !ruby/object:Gem::Requirement
415
415
  requirements:
416
416
  - - '='
417
417
  - !ruby/object:Gem::Version
418
- version: 0.26.1
418
+ version: 0.26.2
419
419
  description: MixRails is a CMS and system based on Ruby on Rails
420
420
  email:
421
421
  - sadjow@gmail.com
@@ -1472,7 +1472,6 @@ files:
1472
1472
  - admix/app/controllers/admix/inherited_controller.rb
1473
1473
  - admix/app/controllers/admix/passwords_controller.rb
1474
1474
  - admix/app/controllers/admix/registrations_controller.rb
1475
- - admix/app/controllers/admix/rest_controller.rb
1476
1475
  - admix/app/controllers/admix/sessions_controller.rb
1477
1476
  - admix/app/helpers/.gitkeep
1478
1477
  - admix/app/helpers/admix/tab.rb
@@ -1493,18 +1492,6 @@ files:
1493
1492
  - admix/app/views/admix/inherited/index.html.haml
1494
1493
  - admix/app/views/admix/inherited/new.html.haml
1495
1494
  - admix/app/views/admix/inherited/show.html.haml
1496
- - admix/app/views/admix/rest/_actions.haml
1497
- - admix/app/views/admix/rest/_column_actions.haml
1498
- - admix/app/views/admix/rest/_empty_grid.haml
1499
- - admix/app/views/admix/rest/_form_config.haml
1500
- - admix/app/views/admix/rest/_grid.haml
1501
- - admix/app/views/admix/rest/_grid_actions.haml
1502
- - admix/app/views/admix/rest/_grid_columns.haml
1503
- - admix/app/views/admix/rest/edit.html.haml
1504
- - admix/app/views/admix/rest/form.html.haml
1505
- - admix/app/views/admix/rest/index.html.haml
1506
- - admix/app/views/admix/rest/new.html.haml
1507
- - admix/app/views/admix/rest/show.html.haml
1508
1495
  - admix/app/views/devise/sessions/new.html.haml
1509
1496
  - admix/app/views/layouts/admix/admix.haml
1510
1497
  - admix/app/views/layouts/admix/login.haml
@@ -1776,10 +1763,15 @@ files:
1776
1763
  - mix-rails-contact-us/app/assets/javascripts/mix-rails-contact-us/.gitkeep
1777
1764
  - mix-rails-contact-us/app/assets/stylesheets/mix-rails-contact-us/.gitkeep
1778
1765
  - mix-rails-contact-us/app/controllers/.gitkeep
1766
+ - mix-rails-contact-us/app/controllers/contacts_controller.rb
1779
1767
  - mix-rails-contact-us/app/helpers/.gitkeep
1780
1768
  - mix-rails-contact-us/app/mailers/.gitkeep
1781
1769
  - mix-rails-contact-us/app/models/.gitkeep
1770
+ - mix-rails-contact-us/app/models/contact.rb
1782
1771
  - mix-rails-contact-us/app/views/.gitkeep
1772
+ - mix-rails-contact-us/app/views/contacts/show.haml
1773
+ - mix-rails-contact-us/app/views/templates/contacts/show.haml
1774
+ - mix-rails-contact-us/config/locales/contact.pt-BR.yml
1783
1775
  - mix-rails-contact-us/config/routes.rb
1784
1776
  - mix-rails-contact-us/lib/mix-rails-contact-us.rb
1785
1777
  - mix-rails-contact-us/lib/mix-rails-contact-us/engine.rb
@@ -1819,6 +1811,7 @@ files:
1819
1811
  - mix-rails-core/app/assets/javascripts/colorbox/jquery.colorbox-min.js
1820
1812
  - mix-rails-core/app/assets/javascripts/core/.gitkeep
1821
1813
  - mix-rails-core/app/assets/javascripts/gmaps.js
1814
+ - mix-rails-core/app/assets/javascripts/inputs_masks.coffee
1822
1815
  - mix-rails-core/app/assets/javascripts/jplayer.js
1823
1816
  - mix-rails-core/app/assets/javascripts/jquery-gmaps-latlon-picker.js
1824
1817
  - mix-rails-core/app/assets/javascripts/jquery.GlobalMoneyInput/globinfo/jQuery.glob.af-ZA.js
@@ -2601,6 +2594,7 @@ files:
2601
2594
  - mix-rails-core/db/migrate/20130214134814_add_related_id_related_type_to_attachment.rb
2602
2595
  - mix-rails-core/db/migrate/20130215145358_add_type_to_category.rb
2603
2596
  - mix-rails-core/db/migrate/20130226152256_create_ckeditor_assets.rb
2597
+ - mix-rails-core/db/migrate/20130313020623_acts_as_taggable_on_migration.rb
2604
2598
  - mix-rails-core/lib/mix-rails-core.rb
2605
2599
  - mix-rails-core/lib/mix-rails-core/concerns/engine.rb
2606
2600
  - mix-rails-core/lib/mix-rails-core/engine.rb
@@ -2642,6 +2636,7 @@ files:
2642
2636
  - mix-rails-settings/config/routes.rb
2643
2637
  - mix-rails-settings/db/migrate/20130206201915_create_settings.rb
2644
2638
  - mix-rails-settings/db/migrate/20130206212203_add_image_to_setting.rb
2639
+ - mix-rails-settings/db/seeds.rb
2645
2640
  - mix-rails-settings/lib/mix-rails-settings.rb
2646
2641
  - mix-rails-settings/lib/mix-rails-settings/engine.rb
2647
2642
  - mix-rails-settings/lib/mix-rails-settings/version.rb
@@ -2744,7 +2739,9 @@ files:
2744
2739
  - mix-rails-writer/app/assets/javascripts/writer/.gitkeep
2745
2740
  - mix-rails-writer/app/assets/stylesheets/writer/.gitkeep
2746
2741
  - mix-rails-writer/app/assets/stylesheets/writer/posts/index.scss
2742
+ - mix-rails-writer/app/authorizers/blog_authorizer.rb
2747
2743
  - mix-rails-writer/app/controllers/.gitkeep
2744
+ - mix-rails-writer/app/controllers/admix/blogs_controller.rb
2748
2745
  - mix-rails-writer/app/controllers/admix/news_controller.rb
2749
2746
  - mix-rails-writer/app/controllers/admix/posts_controller.rb
2750
2747
  - mix-rails-writer/app/controllers/news_controller.rb
@@ -2752,10 +2749,14 @@ files:
2752
2749
  - mix-rails-writer/app/helpers/.gitkeep
2753
2750
  - mix-rails-writer/app/mailers/.gitkeep
2754
2751
  - mix-rails-writer/app/models/.gitkeep
2752
+ - mix-rails-writer/app/models/blog.rb
2755
2753
  - mix-rails-writer/app/models/news.rb
2756
2754
  - mix-rails-writer/app/models/post.rb
2757
2755
  - mix-rails-writer/app/uploaders/writer/image_uploader.rb
2758
2756
  - mix-rails-writer/app/views/.gitkeep
2757
+ - mix-rails-writer/app/views/admix/blogs/_form_config.haml
2758
+ - mix-rails-writer/app/views/admix/blogs/_grid_columns.haml
2759
+ - mix-rails-writer/app/views/admix/blogs/_show.html.haml
2759
2760
  - mix-rails-writer/app/views/admix/posts/_form_config.haml
2760
2761
  - mix-rails-writer/app/views/admix/posts/_grid_columns.haml
2761
2762
  - mix-rails-writer/app/views/admix/posts/_show.html.haml
@@ -2765,12 +2766,14 @@ files:
2765
2766
  - mix-rails-writer/config/locales/writer.pt-BR.yml
2766
2767
  - mix-rails-writer/config/routes.rb
2767
2768
  - mix-rails-writer/db/migrate/20130208042530_create_posts.rb
2769
+ - mix-rails-writer/db/migrate/20130313021054_create_blogs.rb
2768
2770
  - mix-rails-writer/lib/mix-rails-writer.rb
2769
2771
  - mix-rails-writer/lib/mix-rails-writer/engine.rb
2770
2772
  - mix-rails-writer/lib/mix-rails-writer/version.rb
2771
2773
  - mix-rails-writer/lib/tasks/writer_tasks.rake
2772
2774
  - mix-rails-writer/mix-rails-writer.gemspec
2773
2775
  - mix-rails-writer/script/rails
2776
+ - mix-rails-writer/spec/models/blog_spec.rb
2774
2777
  - mix-rails.gemspec
2775
2778
  - tasks/release.rb
2776
2779
  - version.rb
@@ -1,46 +0,0 @@
1
- class Admix::RestController < Admix::AdmixController
2
-
3
- inherit_resources
4
-
5
- before_filter -> {
6
- if defined?(parent_type)
7
- breadcrumbs.add t("#{parent_type.to_s.gsub('_', '').pluralize}.#{parent_type.to_s.gsub('_', '').pluralize}") , polymorphic_path([:admix, parent_class])
8
- breadcrumbs.add "#{parent.name}" , parent_url
9
- end
10
- }
11
-
12
- before_filter -> { breadcrumbs.add t("#{collection_name}.#{collection_name}"), collection_url, :i18n => false }
13
- before_filter -> { breadcrumbs.add "#{crumb_field}" , resource_url, :i18n => false } , except: [:index, :new, :create ]
14
- before_filter -> { breadcrumbs.add t("admix.crud.new.title"), :i18n => false } , only: [:new ]
15
- before_filter -> { @crumb_field = crumb_field } , only: [:edit ]
16
-
17
- protected
18
-
19
- def crumb_field
20
- field_name = if resource.respond_to?(:name)
21
- :name
22
- elsif resource.respond_to?(:title)
23
- :title
24
- elsif resource.respond_to?(:email)
25
- :email
26
- else
27
- raise "Implement crumb_field method in #{self}"
28
- end
29
-
30
- resource[field_name]
31
-
32
- end
33
-
34
- def load_grid
35
- @grid = initialize_grid(resource_class)
36
- end
37
-
38
- def collection_name
39
- @collection_name = resource_class.to_s.underscore.pluralize.gsub("::", "_")
40
- end
41
-
42
- def resource_name
43
- resource_class.to_s.downcase
44
- end
45
-
46
- end
@@ -1,7 +0,0 @@
1
- .well
2
- = link_to "#{t('admix.crud.new.link')} " + t("#{@collection_name}.#{@collection_name.singularize}"), new_resource_url, class: 'btn'
3
- = link_to t('admix.crud.list.title', resources: t("#{@collection_name}.#{@collection_name}")), collection_url, class: 'btn'
4
- - if not ['index', 'edit'].include? params[:action]
5
- - if not resource.nil? and not resource.new_record?
6
- = link_edit(resource, t('admix.crud.edit.link'), 'btn-primary')
7
- = link_destroy(resource, t('admix.crud.destroy.link'), 'btn-danger')
@@ -1,3 +0,0 @@
1
- - grid.column do |obj|
2
- - content_tag :div do
3
- = render partial: 'grid_actions', locals: {obj:obj}
@@ -1,3 +0,0 @@
1
- .well
2
- = t('admix.alerts.no_records_found')
3
- = link_to(t('admix.links.new_record'), new_resource_url) + '.'
@@ -1,5 +0,0 @@
1
- = grid(@grid, show_filters: :when_filtered) do |grid|
2
-
3
- - grid.blank_slate partial: "empty_grid"
4
-
5
- = render partial: 'grid_columns', locals: {grid: grid}
@@ -1 +0,0 @@
1
- = grid_actions_for(obj)
@@ -1,11 +0,0 @@
1
- - if resource_class.column_names.include? 'name'
2
- - grid.column name: input_label(:defaults, :name), attribute: 'name' do |obj|
3
- - obj.name
4
- - elsif resource_class.column_names.include? 'title'
5
- - grid.column name: input_label(:defaults, :title), attribute: 'title' do |obj|
6
- - obj.title
7
- - elsif resource_class.column_names.include? 'email'
8
- - grid.column name: input_label(:defaults, :email), attribute: 'email' do |obj|
9
- - obj.email
10
-
11
- - column_actions(grid)
@@ -1,5 +0,0 @@
1
- - collection_name = resource_class.to_s.downcase.pluralize
2
- - resource_name = resource_class.to_s.downcase
3
- = render 'actions'
4
- -#%h1= t('admix.crud.edit.title', resource: resource[@crumb_field])
5
- = render file: 'admix/rest/form'
@@ -1,50 +0,0 @@
1
- - array_of_resources = [:admix]
2
- - if defined? parent_type
3
- - array_of_resources << parent_type
4
- - array_of_resources << resource
5
-
6
- = simple_form_for array_of_resources, :html => {:name => 'AdmixForm', :class => 'form-admix', 'ng-controller' => 'FormController' }, wrapper: :bootstrap do |f|
7
- %h1 {{method}}
8
- = render partial: 'form_config', locals: {f:f}
9
- = f.error_notification
10
-
11
- .row-fluid
12
- .span7
13
- .row-fluid
14
- .span12
15
- .tabbable.tabs-left
16
- %ul#admix_form_tabs.nav.nav-tabs
17
- - if content_for?(:nav_tabs)
18
- = content_for(:nav_tabs)
19
- - elsif @admix_tabs
20
- - @admix_tabs.each do |tab|
21
- = tab.header
22
- .tab-content.well
23
- - if content_for?(:tabs_content)
24
- = content_for(:tabs_content)
25
- - elsif @admix_tabs
26
- - @admix_tabs.each do |tab|
27
- .tab-pane{id: tab.tab_id, class: (tab.options[:first] ? 'active' : '')}
28
- .span12
29
- .row-fluid
30
- = tab.content
31
- .span4
32
- %ul.nav.nav-list.well
33
- %li
34
- .div
35
- = f.button :submit, class: 'btn-primary'
36
- = link_to t('admix.crud.cancel'), collection_url, class: 'btn'
37
- - if not resource.nil? and not resource.new_record?
38
- = link_destroy(resource, t('admix.crud.destroy.link'), 'btn-danger')
39
- - if content_for?(:form_options)
40
- %li.nav-header Opções
41
- %li
42
- = content_for(:form_options)
43
-
44
-
45
- = content_for(:after_inner_form)
46
- = content_for(:after_form)
47
- :coffeescript
48
- $('#admix_form_tabs a').click (e) ->
49
- e.preventDefault()
50
- $(this).tab('show')
@@ -1,3 +0,0 @@
1
- = render 'actions'
2
- -#%h1= t('admix.crud.listing', resources: t("#{@collection_name}.#{@collection_name}"))
3
- = render partial: 'grid'
@@ -1,3 +0,0 @@
1
- = render 'actions'
2
- -#%h1= t('admix.crud.new.title')
3
- = render file: 'admix/rest/form'
@@ -1,3 +0,0 @@
1
- = render 'actions'
2
- -#%h1= t('admix.crud.show.title')
3
- = render partial: 'show', locals: {resource: resource}