From 4d02f0c330c57922d82707a7e87c6bc96eef01e0 Mon Sep 17 00:00:00 2001 From: yinwai92 Date: Thu, 30 Jul 2015 01:57:57 +0800 Subject: [PATCH] added Job_Approval scaffold and Jobs link --- app/assets/javascripts/job_approval.coffee | 3 +++ app/assets/stylesheets/job_approval.scss | 3 +++ app/controllers/job_approval_controller.rb | 2 ++ app/controllers/welcome_controller.rb | 9 +++++++++ app/helpers/job_approval_helper.rb | 2 ++ app/models/job_approval.rb | 2 ++ app/views/jobs/new.html.erb | 5 +++-- app/views/landing_page/home.html.erb | 5 ++++- app/views/layouts/_menu.html.erb | 3 ++- .../20150728140053_create_job_approvals.rb | 11 +++++++++++ db/schema.rb | 17 +++++++++-------- .../controllers/job_approval_controller_test.rb | 7 +++++++ test/fixtures/job_approvals.yml | 11 +++++++++++ test/models/job_approval_test.rb | 7 +++++++ 14 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 app/assets/javascripts/job_approval.coffee create mode 100644 app/assets/stylesheets/job_approval.scss create mode 100644 app/controllers/job_approval_controller.rb create mode 100644 app/controllers/welcome_controller.rb create mode 100644 app/helpers/job_approval_helper.rb create mode 100644 app/models/job_approval.rb create mode 100644 db/migrate/20150728140053_create_job_approvals.rb create mode 100644 test/controllers/job_approval_controller_test.rb create mode 100644 test/fixtures/job_approvals.yml create mode 100644 test/models/job_approval_test.rb diff --git a/app/assets/javascripts/job_approval.coffee b/app/assets/javascripts/job_approval.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/job_approval.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/job_approval.scss b/app/assets/stylesheets/job_approval.scss new file mode 100644 index 0000000..602c474 --- /dev/null +++ b/app/assets/stylesheets/job_approval.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Job_Approval controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/job_approval_controller.rb b/app/controllers/job_approval_controller.rb new file mode 100644 index 0000000..93249de --- /dev/null +++ b/app/controllers/job_approval_controller.rb @@ -0,0 +1,2 @@ +class JobApprovalController < ApplicationController +end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 0000000..305689a --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,9 @@ +class WelcomeController < ActionController::Base + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception + + def index + end + +end diff --git a/app/helpers/job_approval_helper.rb b/app/helpers/job_approval_helper.rb new file mode 100644 index 0000000..379646d --- /dev/null +++ b/app/helpers/job_approval_helper.rb @@ -0,0 +1,2 @@ +module JobApprovalHelper +end diff --git a/app/models/job_approval.rb b/app/models/job_approval.rb new file mode 100644 index 0000000..b3664c0 --- /dev/null +++ b/app/models/job_approval.rb @@ -0,0 +1,2 @@ +class JobApproval < ActiveRecord::Base +end diff --git a/app/views/jobs/new.html.erb b/app/views/jobs/new.html.erb index b5a457d..ae278a4 100644 --- a/app/views/jobs/new.html.erb +++ b/app/views/jobs/new.html.erb @@ -1,5 +1,6 @@

New Job

- + Please fill in job details in the form below. <%= render 'form' %> -<%= link_to 'Back', jobs_path %> +<%= link_to 'Back', jobs_path %> | +<%= link_to 'Home', root_url %> diff --git a/app/views/landing_page/home.html.erb b/app/views/landing_page/home.html.erb index 4c95b50..2e7de01 100644 --- a/app/views/landing_page/home.html.erb +++ b/app/views/landing_page/home.html.erb @@ -1 +1,4 @@ -

This is the home page

+

This is the home page

+ +

suppose when user first signed up, the will first see their profile (wireframe)

+

then when user logged in (existing user), they will see home page (joblist page)

diff --git a/app/views/layouts/_menu.html.erb b/app/views/layouts/_menu.html.erb index 8c54f3b..7690691 100644 --- a/app/views/layouts/_menu.html.erb +++ b/app/views/layouts/_menu.html.erb @@ -16,7 +16,8 @@