-if @need %h1 Gestion des offres pour le besoin %strong= @need.title %p.alert.alert-info Seul les offres concernant le besoin %strong= @need.title sont affichées sur cette page. %br Pour voir toutes les offres, aller dans l'onglet %strong Gestion des offres depuis la barre de navigation -else %h1 Gestion des offres %p.alert.alert-info Cette page affiche toutes les offres existantes. %br Pour créer une offre, il faut d'abord choisir un besoin. Pour cela, passer par l'onglet %strong Gestion des besoins puis cliquer sur le bouton %strong= ic(:gift) en face du besoin de votre choix. -if @offers.length < 1 Aucune offre actuellement -if @need %br %br =link_to "Ajouter une offre", new_admin_need_offer_path(@need),class:"btn btn-primary" %br -else .row .col-md-10 %table.table.admin-table.table-hover.table-striped %thead.rows_header %tr %th Besoin concerné par l'offre %th Fournisseur %th Prix négocié %th{style:"text-align:center;"} Clients Intéressés %th{style:"text-align:center;"} Offres Acceptées %th{:style => "width:100px"}   %tbody.rows =render @offers .pagination.pull-right= paginate @offers .col-md-2 -if @need =link_to "Ajouter une offre", new_admin_need_offer_path(@need),class:"btn btn-primary btn-block" %br = semantic_form_for :search, :html => {id: :search_form, :method => :get } do |f| = f.inputs do = f.inputs do =f.input :q, :as => :search, label: "Recherche", input_html: {value: params[:q], :name => 'q' }, placeholder: "Par nom de besoin ou fournisseur" .clear = 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.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 %br %br :javascript $('#search_o').change(function(){$('#search_form').submit()}) $('#search_r').change(function(){$('#search_form').submit()})