mostrar usuarios sin mail
This commit is contained in:
@ -17,7 +17,7 @@ class UsersController < ApplicationController
|
||||
|
||||
def show
|
||||
@user = current_user if current_user.id == params[:id].to_i
|
||||
@user ||= scoped_users.find(params[:id])
|
||||
@user ||= scoped_users.find(params[:id])
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@ -21,7 +21,8 @@ module UsersHelper
|
||||
toggle_manager_link: ((superadmin? || admin?) && user != current_user) ? toggle_manager_member_path(membership) : "",
|
||||
manager: !!membership.manager,
|
||||
toggle_active_link: (superadmin? || admin?) ? toggle_active_member_path(membership) : "",
|
||||
active: membership.active?
|
||||
active: membership.active?,
|
||||
email_sample: user.email_sample?
|
||||
}
|
||||
end.to_json.html_safe
|
||||
end
|
||||
|
||||
@ -98,4 +98,9 @@ class User < ActiveRecord::Base
|
||||
set_dummy_email if empty_email
|
||||
save
|
||||
end
|
||||
|
||||
def email_sample?
|
||||
self.email.include? "example.com"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
{{user.email}}
|
||||
%a{ng_href: "mailto:{{user.unconfirmed_email}}", ng_if: "user.unconfirmed_email"}
|
||||
{{user.unconfirmed_email}}
|
||||
%td
|
||||
%span.glyphicon.glyphicon-ok{ "ng-if" => "!user.email_sample" }
|
||||
%td {{user.phone}}
|
||||
%td {{user.alt_phone}}
|
||||
%td {{user.balance | timeBalance}}
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
= User.human_attribute_name(:email)
|
||||
%span.glyphicon.glyphicon-chevron-down{ ng_if: "sort == '-email'" }
|
||||
%span.glyphicon.glyphicon-chevron-up{ ng_if: "sort == 'email'" }
|
||||
%th= User.human_attribute_name(:email?)
|
||||
%th= User.human_attribute_name(:phone)
|
||||
%th= User.human_attribute_name(:alt_phone)
|
||||
%th
|
||||
@ -64,7 +65,6 @@
|
||||
%button.btn.btn-primary{"ng-click" => "$close(true)"} OK
|
||||
%button.btn.btn-warning{"ng-click" => "$dismiss()"} NO
|
||||
|
||||
|
||||
:javascript
|
||||
angular.module("timeoverflow").run(function ($rootScope, $location, $http, $modal) {
|
||||
$rootScope.users = #{ users_as_json };
|
||||
|
||||
Reference in New Issue
Block a user