Some fix
This commit is contained in:
parent
2e0c9a793f
commit
7f29387a16
@ -262,6 +262,3 @@ DEPENDENCIES
|
|||||||
wicked_pdf
|
wicked_pdf
|
||||||
wkhtmltopdf-binary
|
wkhtmltopdf-binary
|
||||||
workflow (~> 1.2.0)
|
workflow (~> 1.2.0)
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.10.6
|
|
||||||
|
24
app/views/admin/need_categories/index.html.haml
Normal file → Executable file
24
app/views/admin/need_categories/index.html.haml
Normal file → Executable file
@ -1,16 +1,18 @@
|
|||||||
%h1 Gestion des catégories
|
%h1 Gestion des catégories
|
||||||
|
-if @tree.length < 1
|
||||||
|
Aucune catégorie
|
||||||
|
-else
|
||||||
|
%table.table.admin_table.table-hover.table-striped
|
||||||
|
%thead.rows_header
|
||||||
|
|
||||||
%table.table.admin_table.table-hover.table-striped
|
%tr
|
||||||
%thead.rows_header
|
%th
|
||||||
|
Nom
|
||||||
|
%th{:style => "width:100px"}
|
||||||
|
|
||||||
|
|
||||||
%tr
|
%tbody.rows
|
||||||
%th
|
=render @tree
|
||||||
Nom
|
|
||||||
%th{:style => "width:100px"}
|
|
||||||
|
|
||||||
|
|
||||||
%tbody.rows
|
|
||||||
|
|
||||||
=render @tree
|
|
||||||
|
|
||||||
|
%br
|
||||||
= link_to "Créer une nouvelle catégorie", new_admin_need_category_path, class:"btn btn-primary"
|
= link_to "Créer une nouvelle catégorie", new_admin_need_category_path, class:"btn btn-primary"
|
||||||
|
86
app/views/admin/needs/index.html.haml
Normal file → Executable file
86
app/views/admin/needs/index.html.haml
Normal file → Executable file
@ -1,8 +1,10 @@
|
|||||||
%h1 Gestion des besoins
|
%h1 Gestion des besoins
|
||||||
|
|
||||||
|
%h2 Proposition de besoin
|
||||||
|
-if @needs_to_validate.length < 1
|
||||||
|
Aucune proposition de besoin
|
||||||
|
-else
|
||||||
|
|
||||||
-if @needs_to_validate.length > 0
|
|
||||||
%h2 Modération des besoins
|
|
||||||
%div.alert.alert-info
|
%div.alert.alert-info
|
||||||
Avant qu'un besoin soit visible par l'ensemble des clients, vous devez le valider en cliquant sur le bouton <i class="fa fa-check"></i>
|
Avant qu'un besoin soit visible par l'ensemble des clients, vous devez le valider en cliquant sur le bouton <i class="fa fa-check"></i>
|
||||||
%br
|
%br
|
||||||
@ -28,51 +30,53 @@
|
|||||||
|
|
||||||
=render collection: @needs_to_validate, partial: 'need_to_validate', as: :need
|
=render collection: @needs_to_validate, partial: 'need_to_validate', as: :need
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
|
||||||
%h2 Liste des besoins
|
%h2 Liste des besoins
|
||||||
.row
|
-if @needs.length < 1
|
||||||
.col-md-2
|
Aucun besoin
|
||||||
= semantic_form_for :search, :html => {id: :search_form, :method => :get } do |f|
|
-else
|
||||||
= f.inputs do
|
.row
|
||||||
=f.input :q, :as => :search, label: "Recherche", input_html: {value: params[:q], :name => 'q' }, placeholder: "Rechercher un besoin"
|
.col-md-2
|
||||||
.clear
|
= semantic_form_for :search, :html => {id: :search_form, :method => :get } do |f|
|
||||||
= f.inputs do
|
= f.inputs do
|
||||||
= f.input :o, as: :order, selected: params[:o], input_html: {:name => 'o' }, label: "Ordre d'affichage", :include_blank => false , :as => :select, :collection => @orders
|
=f.input :q, :as => :search, label: "Recherche", input_html: {value: params[:q], :name => 'q' }, placeholder: "Rechercher un besoin"
|
||||||
.clear
|
.clear
|
||||||
= f.inputs do
|
= f.inputs do
|
||||||
= f.input :r, as: :result, selected: params[:r], input_html: {:name => 'r' }, label: 'Résultats par page', :include_blank => false , :as => :select, :collection => [10,20,50,100]
|
= f.input :o, as: :order, selected: params[:o], input_html: {:name => 'o' }, label: "Ordre d'affichage", :include_blank => false , :as => :select, :collection => @orders
|
||||||
.clear
|
.clear
|
||||||
= f.inputs do
|
= f.inputs do
|
||||||
= f.input :c, as: :category, selected: params[:c], input_html: {:name => 'c' }, label: 'Filtrer par catégorie', :include_blank => "Toute catégorie" , :as => :select, :collection => @tree.map{|c| [(c.level > 0 ? (' ' * (c.level - 1)) + "|- ": "").html_safe + c.name, c.id]}
|
= f.input :r, as: :result, selected: params[:r], input_html: {:name => 'r' }, label: 'Résultats par page', :include_blank => false , :as => :select, :collection => [10,20,50,100]
|
||||||
.clear
|
.clear
|
||||||
= link_to "Créer un besoin", new_admin_need_path, class:"btn btn-primary"
|
= f.inputs do
|
||||||
|
= f.input :c, as: :category, selected: params[:c], input_html: {:name => 'c' }, label: 'Filtrer par catégorie', :include_blank => "Toute catégorie" , :as => :select, :collection => @tree.map{|c| [(c.level > 0 ? (' ' * (c.level - 1)) + "|- ": "").html_safe + c.name, c.id]}
|
||||||
|
.clear
|
||||||
|
|
||||||
.col-md-10
|
.col-md-10
|
||||||
%table.table.admin_table.table-hover.table-striped
|
%table.table.admin_table.table-hover.table-striped
|
||||||
%thead.rows_header
|
%thead.rows_header
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
Titre
|
Titre
|
||||||
%th
|
%th
|
||||||
Catégorie
|
Catégorie
|
||||||
%th
|
%th
|
||||||
Émetteur
|
Émetteur
|
||||||
%th{style: 'text-align:center' }
|
%th{style: 'text-align:center' }
|
||||||
Commentaires/Intérêts
|
Commentaires/Intérêts
|
||||||
%th{style: 'text-align:center' }
|
%th{style: 'text-align:center' }
|
||||||
Offres
|
Offres
|
||||||
%th
|
%th
|
||||||
Statut
|
Statut
|
||||||
%th{:style => "width:100px"}
|
%th{:style => "width:100px"}
|
||||||
|
|
||||||
|
|
||||||
%tbody.rows
|
%tbody.rows
|
||||||
|
|
||||||
=render @needs
|
=render @needs
|
||||||
|
|
||||||
.pagination.pull-right= paginate @needs
|
.pagination.pull-right= paginate @needs
|
||||||
|
%br
|
||||||
|
= link_to "Créer un besoin", new_admin_need_path, class:"btn btn-primary"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
app/views/public/my_account/index.html.haml
Normal file → Executable file
2
app/views/public/my_account/index.html.haml
Normal file → Executable file
@ -68,5 +68,5 @@
|
|||||||
=render "public/needs/index", needs: @needs
|
=render "public/needs/index", needs: @needs
|
||||||
-else
|
-else
|
||||||
%p
|
%p
|
||||||
Vous n'avez pas encore proposer de besoin
|
Vous n'avez pas encore proposé de besoin
|
||||||
=link_to "Proposer un besoin", new_public_need_path, :class => "btn btn-primary"
|
=link_to "Proposer un besoin", new_public_need_path, :class => "btn btn-primary"
|
||||||
|
@ -415,7 +415,7 @@ ActiveRecord::Schema.define(version: 20151209125427) do
|
|||||||
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
|
||||||
add_index "needs", ["category_id"], name: "index_needs_on_category_id", using: :btree
|
add_index "needs", ["category_id"], name: "index_needs_on_category_id", using: :btree
|
||||||
add_index "needs", ["deleted_at"], name: "index_needs_on_deleted_at", using: :btree
|
add_index "needs", ["deleted_at"], name: "index_needs_on_deleted_at", using: :btree
|
||||||
add_index "needs", ["title"], name: "index_needs_on_title", using: :btree
|
add_index "needs", ["title"], name: "index_needs_on_title", length: {"title"=>191}, using: :btree
|
||||||
|
|
||||||
create_table "newsgroups", force: :cascade do |t|
|
create_table "newsgroups", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name", limit: 255
|
||||||
|
Loading…
x
Reference in New Issue
Block a user