app/views/admin/resources/index.html.haml
:css
// h3 {
// color: green;
// font-family: "Times New Roman", Times, serif;
// }
// h1 { color: #F90B6D; font-family: 'Open Sans', sans-serif; text-align: center; letter-spacing: 2px; font-size: 34px; font-weight: 300; line-height: 40px; margin: 0 0 16px; }
h2 { padding: .5cm .5cm .5cm; color: orange; font-family: 'Open Sans', sans-serif; letter-spacing: 2px; font-size: 34px; font-weight: 300; line-height: 40px; margin: 0 0 16px; }
h3 { color: orange; font-family: 'Open Sans', sans-serif;letter-spacing: 2px; font-size: 34px; font-weight: 300; line-height: 40px; margin: 0 0 16px; }
h4 {padding: .5cm .5cm .5cm;}
p { color: #222; font-family: 'Open Sans', sans-serif; font-size: 15px; font-weight: 400; line-height: 24px; margin: 0 0 14px; }
a { font-weight: bold; text-decoration: none; }
#link { color: #0000EE; text-decoration: none; }
a:hover { color: #551A8B; text-decoration: none; }
ul {list-style-type: none; padding: 4; margin: 0; }
body {margin-left: 10px}
div#one {padding-left: 5em; }
div#two {padding-left: 2em; width:500px;}
table { border-collapse: separate; border-spacing: 10px;}
td { padding-top: .5em; padding-bottom: .5em;}
// td:nth-child(1) { column-width: 400px;}
#num { color: #686868 ; white-space:nowrap; font-weight: bold;}
#Rbtn {margin-top: 10px; margin-bottom: 15px; background-color: $orange-primary; border-color: $orange-primary;}
%h1.pg-header Resources
// = link_to 'Add a new resource', new_resource_path, :class => "btn btn-primary btn-block"
- if current_admin
%div#two
%a#Rbtn.btn.btn-primary.btn-block{:href => new_resource_path, :role => "button"} Add a new resource
%div.panel
// link_to "Create new hotspot", hotspot_build_index_path(:hotspot_id => "building"), :method => :post, :id => "hotspotbtn", :class => "btn btn-primary btn-block"
- if !current_admin
%h2 EMERGENCY!
%div#one
CALL 911 or 415 5530-8090 from a cell phone for life-threatening situations
%br
%u OR
a crime in progress(event property crimes)
%br
%u OR
suspicious behavior that has suddenly escalated.
%div.panel
%h2 NON-EMERGENCY POLICE
%table{:cellspacing => "10"}
%tbody
- @type1 = Resource.where(:kind => 1)
- @type1.each do |resource|
%tr
%td
%td
- if resource.link != ''
%a{:href => resource.link} #{resource.title}
- else
%b= resource.title
= resource.description
#num= resource.phone
- if current_admin
%td= link_to 'Show', resource
%td= link_to 'Edit', edit_resource_path(resource)
%td= link_to 'Delete', resource, method: :delete, data: { confirm: 'Are you sure?' }
- if !current_admin
%h2 CALL 311 FOR (ALMOST) EVERYTHING ELSE
%h4
Complete information at
%a{:href => "http://www.sf311.org"} www.sf311.org
%div#two
311 corrdinates, directs & tracks city questions and issues. Alyways ask for the
CAD tracking number to track a complaint.
%br
A PDF of this Safety Resources List can be found
%a{:href => "http://www.sf311.org"} here
%h5 Call 311 for Problems
%UL
%li Animals lost or found
%li Driveways blocked
%li Dumping illegally
%li Graffiti
%li MUNI problems
%li Parking meters broken
%li Playgrounds & parks
%li Potholes
%li Sidewalk buckling
%li
Streetlights broken or flickering. Get the ID
number from the pole + nearest house address.
%li Tree maintenance
%li
Vehicles - abandoned (parked 72+ hours). Get
license plate number.
%li Vehicles – people living inside, call 553-0123
%h5 Call 311 for Information
%ul
%li Birth, marriage, and death certificates
%li City Codes
%li IDs
%li MUNI schedules
%li Permits (new)
%li Taxes
%h5 Contact City Attorney or Code Enforcement
- if !current_admin
%div#two
Report public nuisance violations that endanger
health & safety: unsafe building conditions,
slumlords, hoarding, overgrown or poorly maintained
lots, etc. Main number: 554-4700
Report online or via free smartphone app at
%a{:href => "http://www.up2code.org"} www.up2code.org
%div.panel
%h2 BE INFORMED
%table{:cellspacing => "10"}
%tbody
- @type1 = Resource.where(:kind => 2)
- @type1.each do |resource|
%tr
%td
%td
- if resource.link != ''
%a{:href => resource.link} #{resource.title}
- else
%b= resource.title
= resource.description
#num= resource.phone
- if current_admin
%td= link_to 'Show', resource
%td= link_to 'Edit', edit_resource_path(resource)
%td= link_to 'Delete', resource, method: :delete, data: { confirm: 'Are you sure?' }
%div.panel
%h2 GET INVOLVED
%table{:cellspacing => "10"}
%tbody
- @type1 = Resource.where(:kind => 3)
- @type1.each do |resource|
%tr
%td
%td
- if resource.link != ''
%a{:href => resource.link} #{resource.title}
- else
%b= resource.title
= resource.description
#num= resource.phone
- if current_admin
%td= link_to 'Show', resource
%td= link_to 'Edit', edit_resource_path(resource)
%td= link_to 'Delete', resource, method: :delete, data: { confirm: 'Are you sure?' }
%div.panel
%h2 OTHER CONTACTS
%table{:cellspacing => "10"}
%tbody
- @type1 = Resource.where(:kind => 4)
- @type1.each do |resource|
%tr
%td
%td
%b= resource.title
= resource.description
%br/
= resource.link
#num= resource.phone
- if current_admin
%td= link_to 'Show', resource
%td= link_to 'Edit', edit_resource_path(resource)
%td= link_to 'Delete', resource, method: :delete, data: { confirm: 'Are you sure?' }
%br
/ <haml:loud> link_to 'Add a New Resource', new_resource_path </haml:loud>