paging and a little styling
This commit is contained in:
0
app/views/docs/_sub_nav.html.haml
Normal file
0
app/views/docs/_sub_nav.html.haml
Normal file
@ -10,7 +10,7 @@
|
||||
%body
|
||||
= render partial: 'layouts/alerts'
|
||||
= render partial: 'layouts/navigation'
|
||||
= render partial: 'sub_nav' if lookup_context.find_all('sub_nav').any?
|
||||
= render partial: 'sub_nav'
|
||||
= yield
|
||||
= render partial: 'layouts/footer'
|
||||
= yield :modals
|
||||
|
4
app/views/pages/_sub_nav.html.haml
Normal file
4
app/views/pages/_sub_nav.html.haml
Normal file
@ -0,0 +1,4 @@
|
||||
%ul.sub-nav
|
||||
%li= link_to 'View Past Pages', list_pages_path
|
||||
%li= link_to 'Send Page', page_person_path
|
||||
|
@ -1,5 +1,25 @@
|
||||
%h1 Pages
|
||||
|
||||
- @pages.each do |page|
|
||||
%ul
|
||||
%li= raw(ap page)
|
||||
%ul.page_listing
|
||||
%li
|
||||
sent by:
|
||||
%span= page.user.name unless page.user.nil?
|
||||
%li
|
||||
to:
|
||||
%span= page.person.name
|
||||
%li
|
||||
phone:
|
||||
%span= page.to
|
||||
%li
|
||||
message:
|
||||
%span= page.message
|
||||
%li
|
||||
status:
|
||||
%span= page.status
|
||||
%li
|
||||
sent at:
|
||||
%span= page.created_at.strftime("%m/%d/%Y %I:%M %p")
|
||||
%li
|
||||
last modified at:
|
||||
%span= page.updated_at.strftime("%m/%d/%Y %I:%M %p")
|
||||
|
@ -1,8 +1,6 @@
|
||||
= form_for :page do |f|
|
||||
= f.hidden_field :user_id, value: current_user.id
|
||||
|
||||
= form_for :page, url: send_page_path do |f|
|
||||
= f.label :person_id
|
||||
= f.select :person_id, options_from_collection_for_select(@people, :id, :name, @page.person_id)
|
||||
= f.select :person_id, options_from_collection_for_select(@people, :id, :name, @page.person_id), include_blank: true
|
||||
|
||||
= f.label :to
|
||||
= f.phone_field :to
|
||||
@ -17,6 +15,3 @@
|
||||
$('#page_person_id').on('change', function(){
|
||||
$('#page_to').val( getPersonPhone($(this).val(), people) );
|
||||
});
|
||||
|
||||
console.log(people);
|
||||
|
||||
|
2
app/views/parents/_sub_nav.html.haml
Normal file
2
app/views/parents/_sub_nav.html.haml
Normal file
@ -0,0 +1,2 @@
|
||||
%ul.sub-nav
|
||||
|
2
app/views/staff/_sub_nav.html.haml
Normal file
2
app/views/staff/_sub_nav.html.haml
Normal file
@ -0,0 +1,2 @@
|
||||
%ul.sub-nav
|
||||
|
2
app/views/users/_sub_nav.html.haml
Normal file
2
app/views/users/_sub_nav.html.haml
Normal file
@ -0,0 +1,2 @@
|
||||
%ul.sub-nav
|
||||
|
Reference in New Issue
Block a user