Minor features/fixes

* Fix admin sub menus
* Show email address in people#index
* Add User Area link in navbar
* Smaller textareas on proposal#new so you don't have to scroll
* Counting of registrations, users and people
* Use datatables for users and people
* Show event type on admin/events#show
This commit is contained in:
Henne Vogelsang 2013-05-07 14:46:33 +02:00 committed by Henne Vogelsang
parent a557f3750e
commit 3022e8b8e6
11 changed files with 151 additions and 21 deletions

View file

@ -5,14 +5,17 @@
%i= @event.subtitle
.span2
-#= link_to "Edit Submission", edit_admin_conference_event_path(@conference.short_title, @event),
-# :class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
= link_to "Edit Submission", "#",
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
.row-fluid
.span12
%table.table
%tr
%td
%b Type
%td
= @event.event_type.title
%tr
%td
%b State

View file

@ -1,5 +1,11 @@
%table.table.table-striped.table-bordered.table-hover
%h2
People
- if @people
= "(#{@people.length})"
%table.table.table-striped.table-bordered.table-hover#people
%thead
%th
%b Email
%th
%b Last Name
%th
@ -11,8 +17,16 @@
%th
- @people.each do |person|
%tr
%td= person.email
%td= person.last_name
%td= person.first_name
%td= person.public_name
%td= person.registrations.count
%td= link_to "View", admin_person_path(person)
%td= link_to "View", admin_person_path(person)
:javascript
$(document).ready(function() {
$('#people').dataTable( {
sPaginationType: "full_numbers"
} );
} );

View file

@ -4,6 +4,10 @@
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-success"
.row-fluid
.span12
%h2
Registrations
- if @registrations
= "(#{@registrations.length})"
%table.table.table-striped.table-bordered.table-hover
%thead
%th
@ -45,4 +49,4 @@
%td
= link_to "Edit", "#", :class => "btn btn-primary"
%td
= link_to "Delete", "#", :class => "btn btn-danger", :confirm => "Really delete registration for #{registration.public_name}?"
= link_to "Delete", "#", :class => "btn btn-danger", :confirm => "Really delete registration for #{registration.public_name}?"

View file

@ -28,11 +28,11 @@ prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
else
row << " "
end
row << registration.arrival
row << registration.departure
row << registration.arrival.to_s
row << registration.departure.to_s
table_array << row
end
pdf.text "#{@conference.title} Registrations", :font_size => 25
pdf.table table_array, :header => true, :cell_style => {:size => 5, :border_width => 1}
end
end

View file

@ -1,7 +1,11 @@
.container-fluid
.row-fluid
.span12
%table.table.table-striped.table-bordered.table-hover
%h2
Users
- if @users
= "(#{@users.length})"
%table.table.table-striped.table-bordered.table-hover#users
%thead
%th
%b Email
@ -55,3 +59,9 @@
"data-content" => user.popup_details,
"data-original-title" => ""
:javascript
$(document).ready(function() {
$('#users').dataTable( {
sPaginationType: "full_numbers"
} );
} );