oxen_account 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile +5 -1
- data/app/controllers/oxen/accounts_controller.rb +18 -0
- data/app/helpers/oxen/accounts_helper.rb +13 -0
- data/app/models/ox_account.rb +13 -0
- data/app/policies/oxen/account_policy.rb +51 -0
- data/app/views/devise/mailer/invitation_instructions.html.erb +1088 -4
- data/app/views/oxen/accounts/_account.html.haml +4 -0
- data/app/views/oxen/accounts/_accounts.html.haml +18 -0
- data/app/views/oxen/accounts/_form.html.haml +82 -0
- data/app/views/oxen/accounts/_show.html.haml +4 -0
- data/app/views/{accounts → oxen/accounts}/index.json.jbuilder +0 -0
- data/app/views/{accounts → oxen/accounts}/show.json.jbuilder +0 -0
- data/app/views/users/_account_user.html.haml +6 -4
- data/app/views/users/_account_users.html.haml +21 -2
- data/app/views/users/_user.html.haml +9 -0
- data/app/views/users/{_user.html.erb → _user_form.html.erb} +0 -0
- data/app/views/users/_users.html.haml +15 -0
- data/app/views/users/invitations/_new.html.haml +1 -1
- data/app/views/users/invitations/create.html.haml +3 -19
- data/config/initializers/devise.rb +58 -1
- data/config/routes.rb +38 -3
- data/lib/generators/oxen_account/account_generator.rb +2 -0
- data/lib/oxen_account.rb +4 -3
- data/lib/oxen_account/version.rb +1 -1
- data/oxen_account.gemspec +2 -0
- metadata +16 -22
- data/app/assets/javascripts/pw_strength.js.coffee +0 -24
- data/app/assets/javascripts/zxcvbn.js +0 -43
- data/app/controllers/accounts/base/accounts_controller.rb +0 -90
- data/app/controllers/users/base/invitations_controller.rb +0 -61
- data/app/controllers/users/base/users_controller.rb +0 -68
- data/app/helpers/accounts_helper.rb +0 -7
- data/app/models/account.rb +0 -8
- data/app/models/user.rb +0 -18
- data/app/policies/account_policy.rb +0 -44
- data/app/policies/user_policy.rb +0 -36
- data/app/views/accounts/_form.html.haml +0 -32
- data/app/views/accounts/index.html.haml +0 -37
- data/app/views/accounts/show.html.haml +0 -16
- data/app/views/users/_form.html.haml +0 -50
- data/app/views/users/index.html.haml +0 -43
- data/oxen_account-0.1.0.gem +0 -0
@@ -1,37 +0,0 @@
|
|
1
|
-
|
2
|
-
- content_for :title do
|
3
|
-
= t('.title')
|
4
|
-
|
5
|
-
.row
|
6
|
-
.col.s12
|
7
|
-
%h3= t('.title')
|
8
|
-
%form{ class: 'col s12', style: "font-size: 1.5em"}
|
9
|
-
.input-field
|
10
|
-
%input.col.s11{ placeholder: "#{ t('.search')}", autofocus:"autofocus", type: "text", name:"account[q]", id:'account_q'}
|
11
|
-
%i.col.s1.mdi-action-search{ style: "font-size: 2em"}
|
12
|
-
|
13
|
-
.row
|
14
|
-
.col.s12
|
15
|
-
%table.responsive-table.hoverable.striped
|
16
|
-
%thead
|
17
|
-
%tr
|
18
|
-
%th{ :"data-field"=>"name"}= t('.name')
|
19
|
-
%th{ :"data-field"=>"active"}= t('.active')
|
20
|
-
%th= t(:delete)
|
21
|
-
|
22
|
-
%tbody
|
23
|
-
- @resources.each do |account|
|
24
|
-
%tr{ id: "tr-#{account.id}"}
|
25
|
-
%td= link_to account.name, account
|
26
|
-
%td
|
27
|
-
- if account.active
|
28
|
-
%i.mdi-action-done.small
|
29
|
-
%td
|
30
|
-
= link_to account, class: 'delete_link', data: { url: '/admin/accounts', name: "#{account.name}", id: "#{account.id}", remove: "#tr-#{account.id}" } do
|
31
|
-
%i.mdi-action-delete.small{ title: "#{t('.delete')}"}
|
32
|
-
|
33
|
-
%br
|
34
|
-
|
35
|
-
.row
|
36
|
-
.right-align
|
37
|
-
= link_to t('.new'), new_account_path, class: 'waves-effect waves-light btn' if policy(resource).new?
|
@@ -1,16 +0,0 @@
|
|
1
|
-
- content_for :title do
|
2
|
-
= t( @resource_class.table_name + '.show.title')
|
3
|
-
|
4
|
-
- @disabled = true
|
5
|
-
|
6
|
-
%h3= t( @resource_class.table_name + '.show.title')
|
7
|
-
|
8
|
-
= render 'form'
|
9
|
-
|
10
|
-
.right-align
|
11
|
-
= link_to t( @resource_class.table_name + '.actions.edit'), edit_resource_url, class: 'waves-effect waves-light btn'
|
12
|
-
= link_to t( @resource_class.table_name + '.actions.index'), resources_url, class: 'waves-effect waves-light btn'
|
13
|
-
|
14
|
-
- if %w{ show }.include? params[:action]
|
15
|
-
= render partial: 'users/account_users'
|
16
|
-
= render partial: 'users/invitations/new', locals: { account_id: resource.id }
|
@@ -1,50 +0,0 @@
|
|
1
|
-
= simple_form_for(resource, html: {class: 'col sl12'} ) do |f|
|
2
|
-
/ - if parent?
|
3
|
-
/ = render @parent
|
4
|
-
= f.error_notification
|
5
|
-
|
6
|
-
.form-inputs
|
7
|
-
.row
|
8
|
-
.input-field.col.s12
|
9
|
-
= f.input :name, class: :validate, disabled: @disabled, autofocus: true
|
10
|
-
|
11
|
-
.row
|
12
|
-
.input-field.col.s12
|
13
|
-
= f.input :account_id, collection: policy_scope(Account), class: :validate, disabled: @disabled, autofocus: true
|
14
|
-
|
15
|
-
.row
|
16
|
-
.input-field.col.s12
|
17
|
-
= f.input :email, class: :validate, disabled: @disabled, autofocus: true
|
18
|
-
|
19
|
-
.row
|
20
|
-
.input-field.col.s6
|
21
|
-
= f.input :password, class: :validate, disabled: @disabled, autofocus: true
|
22
|
-
|
23
|
-
.input-field.col.s6
|
24
|
-
= f.input :password_confirmation, class: :validate, disabled: @disabled, autofocus: true
|
25
|
-
|
26
|
-
|
27
|
-
.row
|
28
|
-
.input-field.col.s6
|
29
|
-
= f.input :role, collection: User.policed_roles(current_user), class: :validate, disabled: @disabled
|
30
|
-
.input-field.col.s6
|
31
|
-
%label{ style: "margin-top: -20px"}= t('.account_active')
|
32
|
-
.switch
|
33
|
-
%label
|
34
|
-
= t(:passive)
|
35
|
-
=f.check_box :active, disabled: @disabled
|
36
|
-
%span.lever
|
37
|
-
= t(:active)
|
38
|
-
|
39
|
-
.row
|
40
|
-
.col.sl12{ style: "margin-bottom: 30px"}
|
41
|
-
%hr
|
42
|
-
|
43
|
-
- unless @disabled
|
44
|
-
.row
|
45
|
-
.form-actions.right-align
|
46
|
-
= f.button :submit, t(".#{params[:action]}.submit")
|
47
|
-
|
48
|
-
- if %w{ show edit }.include? params[:action]
|
49
|
-
:coffeescript
|
50
|
-
$('form label').addClass('active')
|
@@ -1,43 +0,0 @@
|
|
1
|
-
|
2
|
-
- content_for :title do
|
3
|
-
= t('.title')
|
4
|
-
|
5
|
-
.row
|
6
|
-
.col.s12
|
7
|
-
%h3= t('.title')
|
8
|
-
%form{ class: 'col s12', style: "font-size: 1.5em"}
|
9
|
-
.input-field
|
10
|
-
%input.col.s11{ placeholder: "#{ t('.search')}", autofocus:"autofocus", type: "text", name:"user[q]", id:'user_q'}
|
11
|
-
%i.col.s1.mdi-action-search{ style: "font-size: 2em"}
|
12
|
-
|
13
|
-
.row
|
14
|
-
.col.s12
|
15
|
-
%table.responsive-table.hoverable.striped
|
16
|
-
%thead
|
17
|
-
%tr
|
18
|
-
%th{ :"data-field"=>"name"}= t('.name')
|
19
|
-
%th{ :"data-field"=>"account"}= t('.account')
|
20
|
-
%th{ :"data-field"=>"email"}= t('.email')
|
21
|
-
%th{ :"data-field"=>"active"}= t('.active')
|
22
|
-
%th{ :"data-field"=>"invitations"}= t('.invitations')
|
23
|
-
%th= t(:delete)
|
24
|
-
|
25
|
-
%tbody
|
26
|
-
- @resources.each do |user|
|
27
|
-
%tr{ id: "tr-#{user.id}", class:"#{invited_user? user}"}
|
28
|
-
%td= link_to user.name, user
|
29
|
-
%td= link_to( user.account.name, user.account) rescue ''
|
30
|
-
%td= user.email rescue ''
|
31
|
-
%td
|
32
|
-
- if user.active
|
33
|
-
%i.mdi-action-done.small
|
34
|
-
%td= user.invitations.count
|
35
|
-
%td
|
36
|
-
= link_to user, class: 'delete_link', data: { url: '/admin/users', name: "#{user.name}", id: "#{user.id}", remove: "#tr-#{user.id}" } do
|
37
|
-
%i.mdi-action-delete.small{ title: "#{t('.delete')}"}
|
38
|
-
|
39
|
-
%br
|
40
|
-
|
41
|
-
.row
|
42
|
-
.right-align
|
43
|
-
= link_to t('.new'), new_user_path, class: 'waves-effect waves-light btn' if policy(resource).new?
|
data/oxen_account-0.1.0.gem
DELETED
Binary file
|