User/Person models merge
This commit is contained in:
parent
66b84e3660
commit
23bf55b66c
80 changed files with 1064 additions and 1221 deletions
|
|
@ -1,6 +0,0 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :email
|
||||
= f.input :public_name
|
||||
= remove_association_link :person, f
|
||||
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@event.submitter)
|
||||
= link_to @event.submitter.name, admin_user_path(@event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
|
|
|
|||
6
app/views/admin/events/_user_fields.html.haml
Normal file
6
app/views/admin/events/_user_fields.html.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :email
|
||||
= f.input :name
|
||||
= remove_association_link :user, f
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
%td{:style => "width:15%"}
|
||||
%b Rating
|
||||
%td
|
||||
- if @event.average_rating.to_f > 0
|
||||
- if @event.average_rating.to_f > 0
|
||||
#{@event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
- else
|
||||
Rating: 0/#{@conference.call_for_papers.rating}
|
||||
|
|
@ -15,20 +15,20 @@
|
|||
- else
|
||||
= label_tag "label_rating", "", :class => "avgrating"
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%b Voters
|
||||
%td
|
||||
= @event.voters.length
|
||||
- if @event.voters.length > 0
|
||||
(
|
||||
= @ratings.map {|x| "#{x.first_name} #{x.last_name}"}.join ', '
|
||||
= @ratings.map {|x| "#{x.name}"}.join ', '
|
||||
)
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%b Your vote
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, current_user.person)
|
||||
- voted = @event.voted?(@event, current_user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= link_to "", vote_admin_conference_event_path(@conference.short_title, @event, :rating => counter+1), :remote => true, :id =>"label#{counter+1}", :class => "myrating", :voted => true
|
||||
- else
|
||||
|
|
@ -37,20 +37,20 @@
|
|||
|
||||
- if @ratings.length > 0
|
||||
- @ratings.each do |rate|
|
||||
- unless rate.person_id == current_user.person.id
|
||||
- unless rate.user_id == current_user.id
|
||||
%tr
|
||||
%td
|
||||
= rate.first_name
|
||||
= rate.last_name
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, rate.person)
|
||||
- voted = @event.voted?(@event, rate.user)
|
||||
- if voted && voted.rating == counter+1
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating", :voted => true
|
||||
= javascript_tag "$('label[voted=true]').prevAll().andSelf().addClass('bright');"
|
||||
- else
|
||||
= label_tag "label#{counter+1}", "", :class => "othersrating"
|
||||
:javascript
|
||||
:javascript
|
||||
$(function () {
|
||||
var checkedId = $("a[voted='true']").attr('id');
|
||||
$('a[id=' + checkedId + ']').prevAll().andSelf().addClass('bright');
|
||||
|
|
@ -68,4 +68,4 @@
|
|||
$(".myrating").click(function() {
|
||||
$(this).siblings().removeClass("bright");
|
||||
$(this).prevAll().andSelf().addClass("bright");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,14 +58,14 @@
|
|||
- bgcolor=""
|
||||
%td{:style=>"background-color: #{bgcolor}"}
|
||||
- if !event.submitter.nil?
|
||||
=link_to event.submitter.public_name, admin_person_path(event.submitter)
|
||||
=link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
- if event.submitter.registrations.count < 1
|
||||
(Unregistered!)
|
||||
- else
|
||||
Unknown submitter
|
||||
%td
|
||||
- if speaker = event.speakers.first
|
||||
= link_to speaker.public_name, admin_person_path(speaker)
|
||||
= link_to speaker.name, admin_user_path(speaker)
|
||||
- else
|
||||
Unknown speaker
|
||||
- l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
%tr
|
||||
%td
|
||||
- if !version.whodunnit.nil?
|
||||
= Person.find_person_by_user_id(version.whodunnit).public_name
|
||||
= User.find(version.whodunnit).name
|
||||
- else
|
||||
No user (probably via the console)
|
||||
%td
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue