app/views/organizations/report.html.erb
<div class="tabs">
<ul>
<li><a href="#tabs-report">Générateur de rapport</a></li>
</ul>
<div id="tabs-report" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
<%= form_tag "generate_report", method: "post" do %>
<%= hidden_field_tag "organization_id", params[:organization_id] %>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Nom de projet" %>
<%= text_field_tag "title", "" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Nom du produit" %>
<%= text_field_tag "product_name", "" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Date de début" %>
<%= text_field_tag "report_date[start_date]", "", class: 'date-picker' %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Date de fin" %>
<%= text_field_tag "report_date[end_date]", "", class: 'date-picker' %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Categorie de plateforme" %>
<%= select_tag "report[platform_category_id]", options_for_select(@organization.platform_categories.map{|i| [i.name, i.id]}), prompt: "Indifférent" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Catégorie de projets" %>
<%= select_tag "report[project_category_id]", options_for_select(@organization.project_categories.map{|i| [i.name, i.id]}), prompt: "Indifférent" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Catégorie d'acquistion" %>
<%= select_tag "report[acquisition_category_id]", options_for_select(@organization.acquisition_categories.map{|i| [i.name, i.id]}), prompt: "Indifférent" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Secteur de projets" %>
<%= select_tag "report[project_area_id]", options_for_select(@organization.project_areas.map{|i| [i.name, i.id]}), prompt: "Indifférent" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Statut de l'estimation" %>
<%= select_tag "report[estimation_status_id]", options_for_select(@organization.estimation_statuses.map{|i| [i.name, i.id]}), prompt: "Indifférent" %>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12">
<%= label_tag "Avec en-tête" %>
<%= check_box_tag "with_header", "checked" %>
<%= submit_tag "Générer le rapport", class: "btn pull-right" %>
</div>
</div>
<% end %>
</div>
</div>
<script>
$(document).ready(function () {
$(".date-picker").datepicker({
language: '<%= set_user_language %>',
autoclose: true,
todayHighlight: true,
todayBtn: true
});
});
</script>