app/views/projects/_dashboard_inner.html.erb
<div class="row-fluid">
<div class="span3 pbs">
<div class="widget-box collapsible" style="min-height: 320px;">
<div class="widget-title">
<a href="#collapseProduct" data-toggle="collapse">
<span class="icon">
<i class="icon-align-left"></i>
</span>
</a>
<h5><%= I18n.t(:wbs_product) %> - "
<span class="component_name">
<%= current_component %>
</span>
"</h5>
</div>
<div class="collapse in" id="collapseProduct">
<div class="widget-content resizableProduct">
<%= render :partial => 'pe_wbs', :object => @project_default_ratio %>
</div>
</div>
</div>
</div>
<div class="span9 estimation_plan">
<div class="widget-box collapsible" style="min-height: 320px;">
<div class="widget-title">
<a href="#collapseActivity" data-toggle="collapse">
<span class="icon">
<i class="icon-list"></i>
</span>
</a>
<h5><%= I18n.t(:estimation_plan) %>
- <%= current_module_project.nil? ? I18n.t(:notice_no_active_module) : current_module_project %></h5>
<div class="buttons">
<a href="<%= edit_project_path(@project.id, :anchor => 'tabs-4') %>" class="btn btn-mini">
<%= I18n.t(:button_estimation_plan) %>
</a>
<%# link_to "Tout exécuter", "#!", method: "post", class: "btn btn-mini" %>
</div>
</div>
<div class="collapse in" id="collapseActivity">
<div class="widget-content">
<div class="estimation_plan_min overflow">
<%= render 'module_projects/estimation_plan_min', :locals => {:module_projects => @project.module_projects} %>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="widget-box collapsible">
<div class="widget-title">
<a href="#collapseIn" data-toggle="collapse">
<span class="icon">
<i class="icon-align-left"></i>
</span>
</a>
<h5>
<%= I18n.t(:label_input_data) %> - <%= current_component %> - <%= "#{current_module_project}" %>
</h5>
</div>
<div class="collapse in" id="collapseIn">
<div class="widget-content tab-content">
<div class="input">
<div class="input_data">
<% if ["cocomo_basic", "real_size", "balancing_module", "wbs_activity_completion"].include?(current_module_project.pemodule.alias) %>
<%= form_tag({:controller => 'projects', :action => 'run_estimation', :pbs_project_element_id => current_component.id, :start_module_project => current_module_project}, :class => 'simple_form') do -%>
<div id="balancing_module_attributes">
<% if current_module_project.pemodule.alias == "balancing_module" %>
<%= render :partial => 'projects/select_balancing_module_attributes' %>
<% end %>
</div>
<%= raw display_input.blank? ? "#{ content_tag(:div, I18n.t(:notice_no_estimation_plan_defined), :class => 'alert alert-info')}" : display_input %>
<%= submit_tag('Run estimation', :class => 'btn btn-mini pull-right', :title => I18n.t(:tooltip_run_estimation), :id => 'run_estimation') if can_modify_estimation?(@project) %>
<% end %>
<% end %>
<%= render :partial => 'projects/setting_module' %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- show selected view for each module project -->
<!-- The results boxes will be arranged as in the estimation plan -->
<div id="output_data_view_widgets_results">
<%= render :partial => 'views_widgets/dashboard_views_widgets_results', object: [@module_positions, @module_positions_x] %>
</div>
<!-- The Estimation graph -->
<!--<div id="show_estimation_graph">-->
<!--</div>-->
<script>
$(document).ready(function () {
$(".date-picker").datepicker({
language: '<%= set_user_language %>',
autoclose: true,
todayHighlight: true,
todayBtn: true
}).on("hide", function (e) {
$.ajax({
url: "check_attribute",
type: 'POST',
data: "value=" + this.value + "&level=" + this.className.split(/\s/)[1] + "&est_val_id=" + this.className.split(/\s/)[2]
})
});
});
</script>