mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
move rails app into src/, add Vagrantfile & puppet/ assets and add src/.gitignore file
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
//= require bootstrap
|
||||
//= require bootstrap-datepicker
|
||||
//= require bootstrap-select
|
||||
@@ -1,2 +0,0 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
||||
@@ -1,3 +0,0 @@
|
||||
$(function() {
|
||||
$( ".datepicker" ).datepicker();
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
$(function() {
|
||||
$('.selectpicker').selectpicker();
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
||||
* compiled file, but it's generally better to create a new file per style scope.
|
||||
*
|
||||
*= require_self
|
||||
*= require bootstrap
|
||||
*= require_tree .
|
||||
*= require datepicker
|
||||
*= require bootstrap-select
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
// Place all the styles related to the Bikes controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
@@ -1,69 +0,0 @@
|
||||
body {
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
font-family: verdana, arial, helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
p, ol, ul, td {
|
||||
font-family: verdana, arial, helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #eee;
|
||||
padding: 10px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
&:visited {
|
||||
color: #666;
|
||||
}
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
div {
|
||||
&.field, &.actions {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#notice {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.field_with_errors {
|
||||
padding: 2px;
|
||||
background-color: red;
|
||||
display: table;
|
||||
}
|
||||
|
||||
#error_explanation {
|
||||
width: 450px;
|
||||
border: 2px solid red;
|
||||
padding: 7px;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 20px;
|
||||
background-color: #f0f0f0;
|
||||
h2 {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
padding: 5px 5px 5px 15px;
|
||||
font-size: 12px;
|
||||
margin: -7px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #c00;
|
||||
color: #fff;
|
||||
}
|
||||
ul li {
|
||||
font-size: 12px;
|
||||
list-style: square;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
end
|
||||
@@ -1,61 +0,0 @@
|
||||
class BikesController < ApplicationController
|
||||
before_action :set_bike, only: [:show, :edit, :update, :destroy]
|
||||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
@bikes = Bike.all
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def new
|
||||
@bike = Bike.new
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def create
|
||||
@bike = Bike.new(bike_params)
|
||||
respond_to do |format|
|
||||
if @bike.save
|
||||
format.html { redirect_to @bike, notice: 'Bike was successfully created.' }
|
||||
else
|
||||
format.html { render action: 'new' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @bike.update(bike_params)
|
||||
format.html { redirect_to @bike, notice: 'Bike was successfully updated.' }
|
||||
else
|
||||
format.html { render action: 'edit' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@bike.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to bikes_url }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def set_bike
|
||||
@bike = Bike.find(params[:id])
|
||||
end
|
||||
|
||||
def bike_params
|
||||
params.require(:bike).permit(:entry_date, :brand, :model,
|
||||
:type, :color, :frame_size,
|
||||
:log_number, :purpose, :serial_number,
|
||||
:notes, :tag_info, :mechanic,
|
||||
:completion_date, :price,
|
||||
:top_tube_size, :seat_tube_size,
|
||||
:created_at, :updated_at)
|
||||
end
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
class StaticPagesController < ApplicationController
|
||||
def home; end
|
||||
end
|
||||
@@ -1,49 +0,0 @@
|
||||
class VolunteersController < ApplicationController
|
||||
before_action :set_volunteer, only: [:show, :edit, :update, :destroy]
|
||||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
@volunteers = Volunteer.all
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
def new
|
||||
@volunteer = Volunteer.new
|
||||
end
|
||||
|
||||
def edit; end
|
||||
|
||||
def create
|
||||
@volunteer = Volunteer.new(volunteer_params)
|
||||
if @volunteer.save
|
||||
redirect_to @volunteer, notice: 'Volunteer was successfully created.'
|
||||
else
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if @volunteer.update(volunteer_params)
|
||||
redirect_to @volunteer, notice: 'Volunteer was successfully updated.'
|
||||
else
|
||||
render action: 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@volunteer.destroy
|
||||
redirect_to volunteers_url
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
def set_volunteer
|
||||
@volunteer = Volunteer.find(params[:id])
|
||||
end
|
||||
|
||||
def volunteer_params
|
||||
params.require(:volunteer).permit(:name, :email, :phone)
|
||||
end
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
module ApplicationHelper
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
module BikesHelper
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
class Bike < ActiveRecord::Base
|
||||
validates :log_number, presence: true
|
||||
validates :brand, presence: true
|
||||
validates :model, presence: true
|
||||
validates :bike_type, presence: true
|
||||
validates :color, presence: true
|
||||
validates :frame_size, presence: true
|
||||
validates :serial_number, presence: true
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
class User < ActiveRecord::Base
|
||||
# Include default devise modules. Others available are:
|
||||
# :confirmable, :lockable, :timeoutable and :omniauthable
|
||||
devise :database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :trackable, :validatable
|
||||
end
|
||||
@@ -1,3 +0,0 @@
|
||||
class Volunteer < ActiveRecord::Base
|
||||
validates :name, presence: true
|
||||
end
|
||||
@@ -1,78 +0,0 @@
|
||||
- disabled ||= false
|
||||
.form-horizontal
|
||||
.form-group
|
||||
= f.label "Log Number", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :log_number, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Bike Entry Date:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :entry_date, class: "form-control datepicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Brand:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :brand, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Color:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :color, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Top Tube Size:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :top_tube_size, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Seat Tube Size:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :seat_tube_size, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Model:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :model, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Type:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.select :bike_type, [["BMX", "BMX"], ["Cruiser", "Cruiser"], ["Hybrid", "Hybrid"], ["Mountain", "Mountain"], ["Road", "Road"], ["Touring", "Touring"], ["Track", "Track"], ["Utility", "Utility"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Purpose:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], {}, class: "selectpicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Serial Number", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :serial_number, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Notes", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_area :notes, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Tag Info", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_area :tag_info, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Mechanic:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :mechanic, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Completion Date:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :completion_date, class: "form-control datepicker", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Price", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
.input-group
|
||||
%span.input-group-addon $
|
||||
= f.text_field :price, class: "form-control", disabled: disabled
|
||||
@@ -1,12 +0,0 @@
|
||||
.container
|
||||
= form_for @bike, html: {class: 'form-horizontal'} do |f|
|
||||
- if @bike.errors.any?
|
||||
#error_explanation
|
||||
%h2= pluralize(@bike.errors.count, "error") + " prohibited this bike from being saved:"
|
||||
%ul
|
||||
- @bike.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
= render 'fields', f: f
|
||||
.row
|
||||
.actions.col-sm-offset-2
|
||||
= f.submit class: "btn btn-default"
|
||||
@@ -1,6 +0,0 @@
|
||||
.container
|
||||
%h1 Editing bike
|
||||
= render 'form'
|
||||
= link_to 'Show', @bike
|
||||
|
|
||||
= link_to 'Back', bikes_path
|
||||
@@ -1,22 +0,0 @@
|
||||
.container
|
||||
%h1 Bikes
|
||||
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th Brand
|
||||
%th Model
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @bikes.each do |bike|
|
||||
%tr
|
||||
%td= bike.brand
|
||||
%td= bike.model
|
||||
%td= link_to 'Show', bike
|
||||
%td= link_to 'Edit', edit_bike_path(bike)
|
||||
%td= link_to 'Destroy', bike, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
%br
|
||||
= link_to ' + Log Bike', new_bike_path, class: "btn btn-default"
|
||||
@@ -1,3 +0,0 @@
|
||||
%h1 New bike
|
||||
= render 'form'
|
||||
= link_to 'Back', bikes_path
|
||||
@@ -1,7 +0,0 @@
|
||||
.container
|
||||
%p#notice= notice
|
||||
= form_for(@bike) do |f|
|
||||
= render 'fields', f: f, disabled: true
|
||||
= link_to 'Edit', edit_bike_path(@bike)
|
||||
|
|
||||
= link_to 'Back', bikes_path
|
||||
@@ -1,12 +0,0 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
@@ -1,8 +0,0 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
@@ -1,7 +0,0 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
||||
@@ -1,16 +0,0 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div><%= f.label :password, "New password" %><br />
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %></div>
|
||||
|
||||
<div><%= f.submit "Change my password" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,12 +0,0 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,29 +0,0 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %></div>
|
||||
|
||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
||||
<% end %>
|
||||
|
||||
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, autocomplete: "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %></div>
|
||||
|
||||
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password, autocomplete: "off" %></div>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
@@ -1,20 +0,0 @@
|
||||
.container
|
||||
%h2 Sign up
|
||||
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
||||
= devise_error_messages!
|
||||
|
||||
= f.label :email
|
||||
= f.email_field :email, autofocus: true
|
||||
%br
|
||||
|
||||
= f.label :password
|
||||
= f.password_field :password, autocomplete: "off"
|
||||
%br
|
||||
|
||||
= f.label :password_confirmation
|
||||
= f.password_field :password_confirmation, autocomplete: "off"
|
||||
%br
|
||||
|
||||
= f.submit "Sign up"
|
||||
|
||||
= render "devise/shared/links"
|
||||
@@ -1,17 +0,0 @@
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password, autocomplete: "off" %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,25 +0,0 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
@@ -1,12 +0,0 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %></div>
|
||||
|
||||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,10 +0,0 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><%= content_for?(:title) ? yield(:title) : "Bicycle Project Tracker" %></title>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= stylesheet_link_tag "application", :media => "all", "data-turbolinks-track" => true %>
|
||||
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
||||
<%= favicon_link_tag '/favicon.ico' %>
|
||||
</head>
|
||||
@@ -1,18 +0,0 @@
|
||||
<nav class="navbar navbar-default">
|
||||
<div class='navbar-header'>
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<%= link_to "Bicycle Projects", root_path, :class=>"navbar-brand" %>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse navbar-responsive-collapse" id='collapse-1'>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><%= link_to "Bikes", bikes_path %></li>
|
||||
<li><%= link_to "Volunteers", volunteers_path %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<%= render "layouts/head" %>
|
||||
<%= render "layouts/navbar" %>
|
||||
<body>
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +0,0 @@
|
||||
.container
|
||||
%h1 Bicycle Data Tracker
|
||||
= link_to "Bikes", bikes_path
|
||||
%br
|
||||
= link_to "Volunteers", volunteers_path
|
||||
@@ -1,17 +0,0 @@
|
||||
- disabled ||= false
|
||||
|
||||
.form-group
|
||||
= f.label "Name", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :name, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Email address:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :email, class: "form-control", disabled: disabled
|
||||
|
||||
.form-group
|
||||
= f.label "Phone Number:", class: "col-sm-2 control-label"
|
||||
.col-sm-10
|
||||
= f.text_field :phone, class: "form-control", disabled: disabled
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
.container
|
||||
= form_for @volunteer, html: {class: 'form-horizontal'} do |f|
|
||||
- if @volunteer.errors.any?
|
||||
#error_explanation
|
||||
%h2= pluralize(@volunteer.errors.count, "error") + "prohibited this volunteer from being saved:"
|
||||
%ul
|
||||
- @volunteer.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
= render 'fields', f: f
|
||||
.row
|
||||
.actions.col-sm-offset-2
|
||||
= f.submit class: "btn btn-default"
|
||||
@@ -1,6 +0,0 @@
|
||||
.container
|
||||
%h1 Editing Volunteer Information
|
||||
= render 'form'
|
||||
= link_to 'Show', @volunteer
|
||||
|
|
||||
= link_to 'Back', volunteers_path
|
||||
@@ -1,23 +0,0 @@
|
||||
.container
|
||||
%h1 Volunteers
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Phone
|
||||
%th Email
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @volunteers.each do |volunteer|
|
||||
%tr
|
||||
%td= volunteer.name
|
||||
%td= volunteer.phone
|
||||
%td= volunteer.email
|
||||
%td= link_to 'Show', volunteer
|
||||
%td= link_to 'Edit', edit_volunteer_path(volunteer)
|
||||
%td= link_to 'Destroy', volunteer, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
= link_to '+ Add Volunteer', new_volunteer_path, class: "btn btn-default"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
%h1 New Volunteer
|
||||
= render 'form'
|
||||
= link_to 'Back', volunteers_path
|
||||
@@ -1,7 +0,0 @@
|
||||
.container
|
||||
%p#notice= notice
|
||||
= form_for(@volunteer) do |f|
|
||||
= render 'fields', f: f, disabled: true
|
||||
= link_to 'Edit', edit_volunteer_path(@volunteer)
|
||||
|
|
||||
= link_to 'Back', volunteers_path
|
||||
Reference in New Issue
Block a user