2018-03-20 16:33:51 +01:00
|
|
|
<% content_for(:title) do %>
|
|
|
|
<%= display_resource_name('Demandes') %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<header class="main-content__header" role="banner">
|
|
|
|
<h1 class="main-content__page-title" id="page-title">
|
|
|
|
<%= content_for(:title) %>
|
|
|
|
</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="main-content__body main-content__body--flush">
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<% keys = @pending_demandes.first.keys %>
|
|
|
|
<tr>
|
|
|
|
<% keys.each do |key| %>
|
|
|
|
<th class="cell-label cell-label--string cell-label--false" scope="col" role="columnheader" aria-sort="none">
|
|
|
|
<%= key %>
|
|
|
|
</th>
|
|
|
|
<% end %>
|
2018-03-21 10:28:17 +01:00
|
|
|
<th class="cell-label cell-label--string cell-label--false" scope="col" role="columnheader" aria-sort="none">
|
|
|
|
</th>
|
2018-03-20 16:33:51 +01:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @pending_demandes.each do |demande| %>
|
|
|
|
<tr>
|
|
|
|
<% keys.each do |key| %>
|
|
|
|
<td class="cell-data cell-data--string">
|
|
|
|
<%= demande[key] %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
2018-03-23 17:31:03 +01:00
|
|
|
<td class="cell-data cell-data--string" style="text-align: center;">
|
|
|
|
<%= form_tag(manager_demandes_create_administrateur_path) do -%>
|
2018-03-28 15:06:03 +02:00
|
|
|
<%= select_tag "stage_id",
|
2018-03-23 17:31:03 +01:00
|
|
|
options_for_select({
|
2018-04-05 15:59:24 +02:00
|
|
|
"administration centrale" => Pipedrive::DealAdapter::PIPEDRIVE_ADMIN_CENTRAL_STOCK_STAGE_ID,
|
|
|
|
"région" => Pipedrive::DealAdapter::PIPEDRIVE_REGIONS_STOCK_STAGE_ID,
|
|
|
|
"préfecture" => Pipedrive::DealAdapter::PIPEDRIVE_PREFECTURES_STOCK_STAGE_ID,
|
|
|
|
"département" =>Pipedrive::DealAdapter::PIPEDRIVE_DEPARTEMENTS_STOCK_STAGE_ID,
|
|
|
|
"commune" => Pipedrive::DealAdapter::PIPEDRIVE_COMMUNES_STOCK_STAGE_ID,
|
|
|
|
"organisme" => Pipedrive::DealAdapter::PIPEDRIVE_ORGANISMES_STOCK_STAGE_ID
|
2018-03-23 17:31:03 +01:00
|
|
|
}),
|
|
|
|
style: 'margin-bottom: 20px; width: inherit;' %>
|
|
|
|
|
|
|
|
<%= hidden_field_tag 'email', demande[:email] %>
|
|
|
|
<%= hidden_field_tag 'person_id', demande[:person_id] %>
|
|
|
|
|
|
|
|
<%= submit_tag 'Créer' %>
|
|
|
|
<% end -%>
|
2018-03-21 10:28:17 +01:00
|
|
|
</td>
|
2018-03-27 13:32:14 +02:00
|
|
|
<td class="cell-data cell-data--string" style="text-align: center;">
|
2018-03-28 15:06:03 +02:00
|
|
|
<%= button_to('Refuser',
|
|
|
|
manager_demandes_refuse_administrateur_path,
|
2018-03-27 13:52:34 +02:00
|
|
|
params: { person_id: demande[:person_id], email: demande[:email] },
|
2018-03-28 15:06:03 +02:00
|
|
|
style: 'background-color: #FFFFFF; color: #293f54; border: 1px solid #dfe0e1') %>
|
2018-03-27 13:32:14 +02:00
|
|
|
</td>
|
2018-03-20 16:33:51 +01:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|