forked from jasder/taskover
seperate header to individual file
This commit is contained in:
parent
9412d8ec54
commit
ad4e7a5e9f
|
|
@ -42,7 +42,7 @@ class PlansController < ApplicationController
|
|||
def update
|
||||
respond_to do |format|
|
||||
if @plan.update(plan_params)
|
||||
format.html { redirect_to @plan, notice: 'Plan was successfully updated.' }
|
||||
format.html { redirect_to root_url, notice: 'Plan was successfully updated.' }
|
||||
format.json { render :show, status: :ok, location: @plan }
|
||||
else
|
||||
format.html { render :edit }
|
||||
|
|
@ -56,7 +56,7 @@ class PlansController < ApplicationController
|
|||
def destroy
|
||||
@plan.destroy
|
||||
respond_to do |format|
|
||||
format.html { redirect_to plans_url, notice: 'Plan was successfully destroyed.' }
|
||||
format.html { redirect_to root_url, notice: 'Plan was successfully destroyed.' }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ module PlansHelper
|
|||
|
||||
# default color_tag
|
||||
# TODO: User can create different color_tag to choose
|
||||
|
||||
def color_tag_class(color_tag)
|
||||
color_id = color_tag.to_i - 1
|
||||
color_arr = ['gray','blue','green','red','yellow','qing'] # add expect 'gray' at the begin to advoid problem
|
||||
color_arr = ['gray','blue','green','red','yellow','qing']
|
||||
"bs-callout-#{color_arr[color_id]}"
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
.navbar.navbar-default.navbar-static-top
|
||||
.container
|
||||
.navbar-header
|
||||
%button.navbar-toggle.collapsed{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%a.navbar-brand{:href => "/"} Taskile
|
||||
#navbar.navbar-collapse.collapse{"aria-expanded" => "false", :style => "height: 1px;"}
|
||||
%form.navbar-form.navbar-right
|
||||
.form-group
|
||||
%input.form-control{:placeholder => "Email", :type => "text"}
|
||||
.form-group
|
||||
%input.form-control{:placeholder => "Password", :type => "password"}
|
||||
%button.btn.btn-success{:type => "submit"} 登录
|
||||
%button.btn.btn-default{:type => "submit"} 注册
|
||||
|
|
@ -28,23 +28,7 @@
|
|||
= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
|
||||
= javascript_include_tag "application"
|
||||
%body
|
||||
.navbar.navbar-default.navbar-static-top
|
||||
.container
|
||||
.navbar-header
|
||||
%button.navbar-toggle.collapsed{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%a.navbar-brand{:href => "/"} Taskile
|
||||
#navbar.navbar-collapse.collapse{"aria-expanded" => "false", :style => "height: 1px;"}
|
||||
%form.navbar-form.navbar-right
|
||||
.form-group
|
||||
%input.form-control{:placeholder => "Email", :type => "text"}
|
||||
.form-group
|
||||
%input.form-control{:placeholder => "Password", :type => "password"}
|
||||
%button.btn.btn-success{:type => "submit"} 登录
|
||||
%button.btn.btn-default{:type => "submit"} 注册
|
||||
= render "layouts/header"
|
||||
.container
|
||||
= bootstrap_flash
|
||||
= yield
|
||||
|
|
|
|||
Loading…
Reference in New Issue