100 lines
2.9 KiB
Plaintext
Executable File
100 lines
2.9 KiB
Plaintext
Executable File
%h1 Gestion des besoins
|
|
|
|
%h2 Proposition de besoin
|
|
%br
|
|
-if @needs_to_validate.length < 1
|
|
Aucune proposition de besoin
|
|
-else
|
|
|
|
%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>
|
|
%br
|
|
Si pour une raison ou pour une autre le besoin ne respecte pas la charte, cliquez sur le bouton <i class="fa fa-remove"></i>
|
|
|
|
|
|
%table.table.admin-table.table-hover.table-striped
|
|
%thead.rows_header
|
|
|
|
%tr
|
|
%th Réseaux
|
|
%th
|
|
Titre
|
|
%th
|
|
Catégorie
|
|
%th
|
|
Émetteur
|
|
%th
|
|
Créé
|
|
%th{style: 'text-align:center' }
|
|
Commentaires/Intérêts
|
|
%th{:style => "width:200px"}
|
|
|
|
|
|
%tbody.rows
|
|
|
|
=render collection: @needs_to_validate, partial: 'need_to_validate', as: :need
|
|
%br
|
|
%h2 Liste des besoins
|
|
%br
|
|
-if @needs.length < 1
|
|
Aucun besoin
|
|
-else
|
|
.row
|
|
|
|
.col-md-10
|
|
%table.table.admin_table.table-hover.table-striped
|
|
%thead.rows_header
|
|
|
|
%tr
|
|
%th Réseaux
|
|
%th
|
|
Titre
|
|
%th
|
|
Image?
|
|
%th
|
|
Catégorie
|
|
|
|
%th{style: 'text-align:center' }
|
|
Commentaires/Intérêts
|
|
%th{style: 'text-align:center' }
|
|
Propositions
|
|
%th
|
|
Statut
|
|
%th{:style => "width:200px"}
|
|
|
|
|
|
%tbody.rows
|
|
|
|
=render @needs
|
|
.clear
|
|
.pagination.pull-right= paginate @needs
|
|
|
|
|
|
.col-md-2
|
|
= link_to "Créer un nouveau besoin", new_admin_need_path, class:"btn btn-primary btn-block"
|
|
%br
|
|
.col-md-2
|
|
= semantic_form_for :search, :html => {id: :search_form, :method => :get } do |f|
|
|
= f.inputs do
|
|
=f.input :q, :as => :search, label: "Recherche", input_html: {value: params[:q], :name => 'q' }, placeholder: "Rechercher un besoin"
|
|
.clear
|
|
= 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
|
|
.clear
|
|
= 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]
|
|
.clear
|
|
= 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
|
|
|
|
|
|
|
|
%br
|
|
|
|
|
|
:javascript
|
|
$('#search_o').change(function(){$('#search_form').submit()})
|
|
$('#search_r').change(function(){$('#search_form').submit()})
|
|
$('#search_c').change(function(){$('#search_form').submit()})
|