Merge pull request #670 from differentreality/users_changes

Users changes
This commit is contained in:
Stella Rouzi 2015-06-12 10:46:28 +03:00
commit b57e5a64fe
8 changed files with 20 additions and 20 deletions

View file

@ -5,14 +5,15 @@
.avgrating.bright { background-image: image-url("star-bright.png"); }
.avgrating {
background: image-url("star.png") 0 0;
width: 26px;
height: 26px;
margin-right: -2px;
width: 24px;
height: 24px;
display: inline-block;
}
.myrating, .othersrating {
background: image-url("star.png") 0 0;
width: 26px;
height: 26px;
width: 24px;
height: 24px;
float: left;
}

View file

@ -14,7 +14,7 @@ module Admin
# Variable @show_attributes holds the attributes that are visible for the 'show' action
# If you want to change the attributes that are shown in the 'show' action of users
# add/remove the attributes in the following string array
@show_attributes = %w(name email affiliation biography registered attended roles created_at
@show_attributes = %w(name email username nickname affiliation biography registered attended roles created_at
updated_at sign_in_count current_sign_in_at last_sign_in_at
current_sign_in_ip last_sign_in_ip)
end

View file

@ -11,7 +11,7 @@
.col-md-12
%table.table
%tr
%td{:style => "width:15%"}
%td.col-md-2
%b Type
%td
.dropdown

View file

@ -1,6 +1,6 @@
%table.table#myrating
%tr
%td{:style => "width:15%"}
%td.col-md-2
%b Rating
%td
- if @event.average_rating.to_f > 0

View file

@ -40,7 +40,7 @@
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
- if @conference.call_for_paper && @conference.call_for_paper.rating && @conference.call_for_paper.rating > 0
%td{:style => "width:96px"}
%td.col-md-1
- if event.average_rating.to_f > 0
#{event.average_rating}/#{@conference.call_for_paper.rating}
%br

View file

@ -4,7 +4,7 @@
Submissions (#{@user.events.length}) for #{@user.name}
.col-md-12
.well
%table.table.table-bordered.table-striped.table-hover#submissions
%table.table.table-bordered.table-striped.table-hover.datatable#submissions
%thead
%th ID
%th Conference
@ -30,10 +30,3 @@
- else
= label_tag 'label_rating', '', class: 'avgrating'
%td= event.created_at
:javascript
$(document).ready(function() {
$('#submissions').dataTable( {
"bPaginate": false
} );
} );

View file

@ -11,11 +11,17 @@
#user-info-content.tab-pane{class: "#{'active' unless params[:tab] == 'submissions-content'}"}
- if can? :edit, @user
.pull-right
= link_to "Edit", edit_admin_user_path(@user), class: 'btn btn-primary'
= link_to 'Edit', edit_admin_user_path(@user), class: 'btn btn-primary'
- if @user.confirmed?
%span.label.label-success
confirmed
- else
%span.label.label-warning
unconfirmed
%table.table
- @show_attributes.each do |attr|
%tr
%td{class: 'table20'}
%td.col-md-2
%b
= attr.capitalize.gsub('_', ' ')
- if attr == 'roles'

View file

@ -101,9 +101,9 @@
.col-md-12
-if @registration
.btn-group-vertical.pull-right
= link_to 'Edit your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success'
= link_to 'Edit your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success', disabled: @conference.end_date < Date.today
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?'
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?', disabled: @conference.end_date < Date.today
- else
= link_to 'Register', new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'