blob: 1e6d6f9e9be418bb1f0ba807935e8dbda3308a9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<div id="dashboard">
<%= render :partial => 'dashboard/header', :locals => {:back => false} %>
<%
columns=@dashboard.column_layout.split('-')
for index in 1..columns.size()
%>
<div class="dashboard-column-wrapper" style="width: <%= columns[index-1] -%>; ">
<div class="dashboard-column" id="dashboard-column-<%= index -%>" style="margin: 0px <%= index<columns.size() ? "5px" : "0px" -%> 0px <%= index>1 ? "5px" : "0px" -%>;">
<%
@dashboard.widgets.select{|widget| widget.column_index==index}.sort_by{|widget| widget.row_index}.each do |widget|
widget_definition=@widget_definitions.find{|wd| wd.getId()==widget.widget_key }
if widget_definition
%>
<div class="block" id="block_<%= widget.id -%>">
<%= render :partial => 'dashboard/widget', :locals => {:widget => widget, :definition => widget_definition} %>
</div>
<%
end
end
%>
</div>
</div>
<% end %>
<div style="clear: both;"></div>
</div>
|