Field added
This commit is contained in:
parent
6431ec9e64
commit
1b11e9028b
@ -19,8 +19,21 @@
|
|||||||
|
|
||||||
#main{
|
#main{
|
||||||
position:relative;
|
position:relative;
|
||||||
|
.body-container{
|
||||||
|
|
||||||
|
background-color: #ededed;
|
||||||
|
padding-top:50px;
|
||||||
|
padding-bottom:30px;
|
||||||
|
}
|
||||||
|
.footer{
|
||||||
|
height:500px;
|
||||||
|
background-color: #777777;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.top{
|
.top{
|
||||||
|
|
||||||
//margin-bottom:10px;
|
//margin-bottom:10px;
|
||||||
|
@ -136,7 +136,7 @@
|
|||||||
p.description{
|
p.description{
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
color:rgb(163, 159, 159);
|
color:rgb(163, 159, 159);
|
||||||
max-height: 105px;
|
max-height: 55px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -187,7 +187,7 @@
|
|||||||
|
|
||||||
|
|
||||||
.top-left-info{
|
.top-left-info{
|
||||||
background-color: #ede8e8;
|
background-color: #d3d3d3;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
padding:4px;
|
padding:4px;
|
||||||
padding-left:8px;
|
padding-left:8px;
|
||||||
@ -203,8 +203,9 @@
|
|||||||
margin-bottom:30px;
|
margin-bottom:30px;
|
||||||
|
|
||||||
h4{
|
h4{
|
||||||
margin-top:0px;
|
margin-top:20px;
|
||||||
margin-bottom:0px;
|
font-size:20px;
|
||||||
|
margin-bottom:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn{
|
.btn{
|
||||||
|
@ -5,4 +5,5 @@
|
|||||||
.need-container{
|
.need-container{
|
||||||
margin-top:250px;
|
margin-top:250px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ class Public::NeedsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def need_params
|
def need_params
|
||||||
params.require(:need).permit(:title, :devis, :description, :category_id)
|
params.require(:need).permit(:title, :note, :devis, :description, :category_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_owner
|
def check_owner
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
=f.input :description, :label => "Description : ", :rows => 5, :input_html => {:style => "height:100px;"}
|
=f.input :description, :label => "Description : ", :rows => 5, :input_html => {:style => "height:100px;"}
|
||||||
=f.input :image_file_id, :label => "Image", :as => :qi_image_select
|
=f.input :image_file_id, :label => "Image", :as => :qi_image_select
|
||||||
=f.input :author, :label => "Auteur", include_blank: "Administrateur"
|
=f.input :author, :label => "Auteur", include_blank: "Administrateur"
|
||||||
|
= f.input :note, :label => "Informations supplémentaires pour Négos", :rows => 5, :input_html => {:style => "height:100px;"}
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
-if @need.devis?
|
-if @need.devis?
|
||||||
|
@ -48,11 +48,9 @@
|
|||||||
=link_to image_tag("/logo.png", :id => "logo"), "/"
|
=link_to image_tag("/logo.png", :id => "logo"), "/"
|
||||||
|
|
||||||
#main
|
#main
|
||||||
|
.body-container
|
||||||
=yield
|
=yield
|
||||||
|
.footer
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
=#render :partial => "public/shared/bottom"
|
=#render :partial => "public/shared/bottom"
|
||||||
|
@ -6,5 +6,7 @@
|
|||||||
= link_to ic(:download) + " Télécharger le devis actuel", public_need_download_devis_path(@need), class: "btn btn-primary"
|
= link_to ic(:download) + " Télécharger le devis actuel", public_need_download_devis_path(@need), class: "btn btn-primary"
|
||||||
= f.input :category, :as => :select, include_blank: "Toute catégorie", :collection => @tree.map{|c| [(c.level > 0 ? (' ' * (c.level - 1)) + "|- ": "").html_safe + c.name, c.id]}, label: "Catégorie de besoin"
|
= f.input :category, :as => :select, include_blank: "Toute catégorie", :collection => @tree.map{|c| [(c.level > 0 ? (' ' * (c.level - 1)) + "|- ": "").html_safe + c.name, c.id]}, label: "Catégorie de besoin"
|
||||||
= f.input :description, :label => "Description", :rows => 5, :input_html => {:style => "height:100px;"}
|
= f.input :description, :label => "Description", :rows => 5, :input_html => {:style => "height:100px;"}
|
||||||
|
= f.input :note, :label => "Informations supplémentaires (visibles uniquement par les administrateurs Négos)", :rows => 5, :input_html => {:style => "height:100px;"}
|
||||||
|
|
||||||
%br
|
%br
|
||||||
=f.submit "Sauvegarder", :class => "btn btn-primary"
|
=f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
.center.row.need-container
|
.center.row.need-container
|
||||||
|
|
||||||
.row.col-md-9.gutter
|
.row.col-md-9.gutter
|
||||||
|
|
||||||
=render collection: @needs, partial: 'need_item', as: :need
|
=render collection: @needs, partial: 'need_item', as: :need
|
||||||
@ -28,6 +29,7 @@
|
|||||||
= f.inputs do
|
= f.inputs do
|
||||||
= f.input :s, as: :state, selected: params[:s], input_html: {:name => 's' }, label: 'Filter par état', :include_blank => "Tous les états" , :as => :select, :collection => [["En sondage","verified"],["En négociation","negociating"],["Négocié","negociated"],["Négociation échouée","failed"]]
|
= f.input :s, as: :state, selected: params[:s], input_html: {:name => 's' }, label: 'Filter par état', :include_blank => "Tous les états" , :as => :select, :collection => [["En sondage","verified"],["En négociation","negociating"],["Négocié","negociated"],["Négociation échouée","failed"]]
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$('#search_o').change(function(){$('#search_form').submit()})
|
$('#search_o').change(function(){$('#search_form').submit()})
|
||||||
$('#search_r').change(function(){$('#search_form').submit()})
|
$('#search_r').change(function(){$('#search_form').submit()})
|
||||||
|
5
db/migrate/20160317170901_add_note_field_to_need.rb
Normal file
5
db/migrate/20160317170901_add_note_field_to_need.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class AddNoteFieldToNeed < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :needs, :note, :text
|
||||||
|
end
|
||||||
|
end
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160317130441) do
|
ActiveRecord::Schema.define(version: 20160317170901) do
|
||||||
|
|
||||||
create_table "accepted_offers", force: :cascade do |t|
|
create_table "accepted_offers", force: :cascade do |t|
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
@ -448,6 +448,7 @@ ActiveRecord::Schema.define(version: 20160317130441) do
|
|||||||
t.integer "category_id", limit: 4
|
t.integer "category_id", limit: 4
|
||||||
t.string "devis", limit: 255
|
t.string "devis", limit: 255
|
||||||
t.integer "image_file_id", limit: 4
|
t.integer "image_file_id", limit: 4
|
||||||
|
t.text "note", limit: 65535
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "needs", ["author_id"], name: "index_needs_on_author_id", using: :btree
|
add_index "needs", ["author_id"], name: "index_needs_on_author_id", using: :btree
|
||||||
|
Loading…
x
Reference in New Issue
Block a user