<% @devices = @registration.devices.page(@current_page).per(@per_page) %> <% @user = @registration.user %>
<% if @current_user.super_admin? %> <%= edit_image(@user, "profile_picture.image.large.url", upload_image_link(@user, :profile_picture, nil ), remove_image_link(@user, :profile_picture, nil ), image_options: {assoc_name: :profile_picture }) %> <% else %> <%= display_image(@user, "profile_picture.image.large.url", class: "img-circle img-inline userpic-32", alt: @user.display_name) %> <% end %>
<% if @user %> <%= theme_panel_heading(@user.display_name) %> <%= theme_panel_sub_heading(@registration.display_name, "#") %> <% else %> <%= theme_panel_heading(@registration.display_name) %> <% end %>
<% if @registration.pending? %> Pending <% elsif @registration.verified? %> Verified <% end %> <%= clear_tag(10) %>
<%= link_to raw(" Mark as Pending"), update_status_registration_path(:id =>@registration.id, :status =>'pending'), :method =>'PUT', :remote=>true, class: "btn btn-block btn-white btn-only-hover" unless @registration.pending? %> <%= link_to raw(" Verify"), update_status_registration_path(:id =>@registration.id, :status =>'verified'), :method =>'PUT', :remote=>true, class: "btn btn-block btn-success" unless @registration.verified? %> <%= link_to raw(" Suspend"), update_status_registration_path(:id =>@registration.id, :status =>'suspended'), :method =>'PUT', :remote=>true, class: "btn btn-block btn-danger btn-only-hover" unless @registration.suspended? %> <%# edit_link = edit_registration_path(id: @registration.id) %> <%# delete_link = registration_path(id: @registration.id) %> <%#= link_to raw(" Edit Registration"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @current_device.super_admin? and @registration.can_be_edited? %> <%#= link_to raw(" Delete Registration"), delete_link, method: :delete, registration: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @current_device.super_admin? and @registration.can_be_deleted? %>
<%= clear_tag(50) %>
<%= clear_tag(20) %>
ID<%= @registration.id %> User / Profile ID<%= @registration.user_id %>
Status <% if @registration.pending? %> Pending <% elsif @registration.verified? %> Verified <% elsif @registration.suspended? %> Suspended <% end %>
Country<%= @registration.country.try(:display_name) %> City<%= @registration.city.try(:display_name) %>
Dialing Prefix<%= @registration.dialing_prefix %> Mobile Number<%= @registration.mobile_number %>
Created At<%= @registration.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.created_at %> Updated At<%= @registration.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.updated_at %>
<%= clear_tag(20) %>
<% if @current_user.super_admin? %> <% end %>
Name<%= @user.try(:name) %> Username<%= @user.try(:username) %>
Email<%= @user.try(:email) %> Phone<%= @user.try(:phone) %>
Gender<%= @user.gender %> Date of Birth<%= @user.date_of_birth.strftime("%m/%d/%Y") if @user.date_of_birth %>
Designation<%= @user.try(:designation) %> Status <% if @user.pending? %> Pending <% elsif @user.approved? %> Approved <% elsif @user.suspended? %> Suspended <% end %>
Dummy?<%= @user.dummy.to_s.titleize %> Super Admin<%= @user.super_admin?.to_s.titleize %>
<%= clear_tag(20) %>
<%= theme_button('Refresh', 'refresh', registration_devices_path(@registration), classes: "pull-left", btn_type: "white") %>
<%= search_form_kuppayam(Registration, registration_devices_path(@registration), text: "") %>
<%= clear_tag(10) %>
<%= render :partial=>"usman/registration_devices/index" %>
<%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %> <%= clear_tag %>