-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1aaee0f
commit d97b66d
Showing
24 changed files
with
25,586 additions
and
27,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the admin/fake_users controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Admin::FakeUsersController < ApplicationController | ||
|
||
before_action :admin_only | ||
before_action :set_user, only: [:show, :update, :destroy] | ||
|
||
def index | ||
@users = User.where( "created_at < ?", Time.now - 24.hours ).where(confirmed_at: nil).page(params[:page]).per(100) | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Admin::FakeUsersHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#wrapper | ||
.full-width-top | ||
== render 'shared/navigationbar', page: 'home' | ||
|
||
|
||
.admin-account | ||
#sidebar-wrapper | ||
ul class="sidebar-nav" | ||
== render 'admin/shared/sidebar', selected: 'user' | ||
|
||
#page-content-wrapper | ||
.container-fluid | ||
== render 'shared/breadcrumbs', breadcrumbs: { links: { admin: admin_index_path }, current: ''} | ||
.row | ||
.col-sm-7 | ||
h2 Suspicious users | ||
.col-sm-5 | ||
.pull-right.pull-down-10 | ||
= link_to admin_users_path do | ||
.btn.btn-default | ||
i.fa.fa-chevron-left | ||
' Back | ||
|
||
|
||
|
||
|
||
.pull-down-10 | ||
.users | ||
.table-responsive | ||
table class="table table-hover" | ||
thead | ||
tr | ||
th | ||
th Email | ||
th Compleness | ||
th Created | ||
th Name | ||
|
||
/th Role | ||
/th Admin | ||
th Id | ||
tbody | ||
- @users.each do |user| | ||
tr id="delete_user_#{user.id.to_s}" | ||
/td = debug user | ||
td | ||
- if user.role == 'Super' | ||
.btn.btn-danger.btn-xs disabled="disabled" | ||
i class="fa fa-times" | ||
- else | ||
=> link_to admin_user_path( user), data: { confirm: 'Are you sure?.' } , :method => :delete, remote: true do | ||
.btn.btn-danger.btn-xs | ||
i class="fa fa-times" | ||
|
||
=> link_to admin_user_path( user, blacklist: true), data: { confirm: '!WARNING if you blacklist this user no other users from the users domain will be able to signup' } , :method => :delete, remote: true do | ||
.btn.btn-default.btn-xs | ||
'Blacklist | ||
|
||
/=> link_to edit_admin_user_path( user) do | ||
/ .btn.btn-default.btn-xs | ||
/ i class="fa fa-pencil edit-user-#{user.id.to_s}" | ||
/ | ||
/- if account = user.account | ||
/ => link_to edit_admin_account_path( account) do | ||
/ .btn.btn-default.btn-xs | ||
/ i class="fa fa-gear" | ||
/ | ||
/ => link_to account_account_path(account) do | ||
/ div class="btn btn-default btn-xs #{ disabled ='disabled' if account.account_type == 'Social'}" | ||
/ i.fa.fa-tachometer | ||
/ ' | ||
/ 'Pro | ||
/ | ||
/-else | ||
/ .btn.btn-warning.btn-xs | ||
/ i.fa.fa-frown-o | ||
/ ' | ||
/ 'Err | ||
td | ||
= link_to user_path(user) do | ||
.btn.btn-default.btn-xs style="width: 250px; text-align: left; text-overflow: ellipsis;" | ||
- if user.confirmed_at | ||
' √ | ||
- else user.confirmed_at | ||
' - | ||
= user.email | ||
|
||
td = user.completeness | ||
td = time_ago_in_words(user.created_at) | ||
td = user.user_name | ||
/td | ||
/ - if user.featured | ||
/ i.fa.fa-star Featured | ||
/ | ||
/td | ||
/ -if user.account | ||
/ = user.account_type | ||
/td = user.created_at.strftime("%Y-%m-%d") | ||
/td = user.role | ||
/td | ||
/ - if user.administrator | ||
/ 'Administrator | ||
td | ||
= user.id | ||
|
||
.pull-down-10 | ||
== paginate(@users) | ||
== render 'shared/site_footer' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class UpdateUserCompleteness < ActiveRecord::Migration | ||
def change | ||
|
||
User.find_each do |user| | ||
UserCompleteness.process user | ||
user.save(validate: false) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class FixUserCompleteness < ActiveRecord::Migration | ||
def change | ||
|
||
User.find_each do |user| | ||
UserCompleteness.process user | ||
user.save(validate: false) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.