<div class="widget_props" id="widget_props_<%= widget.id -%>" style="<%= 'display:none' if widget.configured -%>">
- <%= render :partial => 'dashboard/widget_properties', :locals => {:widget => widget} -%>
+ <%= render :partial => 'widget_properties', :locals => {:widget => widget} -%>
</div>
<% if back %>
<li class="last"><%= link_to message('dashboard.back_to_dashboard'), {:action => 'index', :did => @dashboard.id, :id => @resource.id } -%></li>
<% else %>
- <% if @dashboard.editable_by?(current_user) %>
+ <% if @dashboard.editable_by?(current_user) %>
<li><%= link_to message('dashboard.configure_widgets'), {:action => 'configure', :did => @dashboard.id, :id => @resource.id } -%></li>
<li><%= link_to message('dashboard.edit_layout'), {:action => 'edit_layout', :did => @dashboard.id, :id => @resource.id } -%></li>
<% end %>
</h4>
</div>
<% end %>
-</div>
\ No newline at end of file
+</div>
<table width="100%">
<% @widget_definitions.each_with_index do |definition, index| %>
<% if index%4==0 %><tr><% end %>
- <%= render :partial => 'dashboard/widget_definition', :locals => {:definition => definition, :dashboard_id => dashboard_id, :resource_id => resource_id, :category => category} %>
+ <%= render :partial => 'widget_definition', :locals => {:definition => definition, :dashboard_id => dashboard_id, :resource_id => resource_id, :category => category} %>
<% if index%4==3 %></tr><% end %>
<% end %>
<% for i in 0..(4-(@widget_definitions.size%4)) %>
</script>
<div id="dashboard">
- <%= render :partial => 'dashboard/header', :locals => {:back => true} %>
+ <%= render :partial => 'header', :locals => {:back => true} %>
<div id="widget_defs">
- <%= render :partial => 'dashboard/widget_definitions', :locals => {:dashboard_id => @dashboard.id, :resource_id => @resource.id, :category => @category} -%>
+ <%= render :partial => 'widget_definitions', :locals => {:dashboard_id => @dashboard.id, :resource_id => @resource.id, :category => @category} -%>
</div>
@dashboard.widgets.select { |widget| widget.column_index==index && widget.java_definition}.sort_by { |widget| widget.row_index }.each do |widget|
%>
<div class="block" id="block_<%= widget.id -%>">
- <%= render :partial => 'dashboard/configure_widget', :locals => {:widget => widget} %>
+ <%= render :partial => 'configure_widget', :locals => {:widget => widget} %>
</div>
<%
end
</div>
<% end %>
<div style="clear: both;"></div>
-</div>
\ No newline at end of file
+</div>
<div id="dashboard">
- <%= render :partial => 'dashboard/header', :locals => {:back => true} %>
+ <%= render :partial => 'header', :locals => {:back => true} %>
<div id="edit-layout" class="admin">
<p class="note"><%= message('dashboard.click_to_choose_layout') -%>: </p><br/>
-
+
<div class="select-layout <%= 'selected' if @dashboard.layout=='100%' -%>" style="text-align:center;width: 20%;">
<%= link_to image_tag('layout100.png'), {:action => 'set_layout', :did => @dashboard.id, :id => @resource.id, :layout => "100%"}, :method => :post %>
</div>
</div>
<div style="clear:both;"></div>
</div>
-</div>
\ No newline at end of file
+</div>
<div id="dashboard">
- <%= render :partial => 'dashboard/header', :locals => {:back => false} %>
+ <%= render :partial => 'header', :locals => {:back => false} %>
<div style="width: 100%;display: block; float: none">
<%
columns=@dashboard.column_layout.split('-')
if widget_definition
%>
<div class="block" id="block_<%= widget.id -%>">
- <%= render :partial => 'dashboard/widget', :locals => {:widget => widget} %>
+ <%= render :partial => 'widget', :locals => {:widget => widget} %>
</div>
<%
end
<% end %>
</div>
<div style="clear: both;"></div>
-</div>
\ No newline at end of file
+</div>
<div class="widget_props" id="widget_props_<%= widget.id -%>" style="<%= 'display:none' if widget.configured -%>">
- <%= render :partial => 'detached/widget_properties', :locals => {:widget => widget} -%>
+ <%= render :partial => 'widget_properties', :locals => {:widget => widget} -%>
</div>
<div class="line-block">
<% if logged_in? %>
- <ul class="operations">
- <% if @dashboard.editable_by?(current_user) %>
- <li><%= link_to message('dashboard.configure_widgets'), {:action => 'configure', :id => @dashboard.id} -%></li>
- <li><%= link_to message('dashboard.edit_layout'), {:action => 'edit_layout', :id => @dashboard.id} -%></li>
- <% end %>
- </ul>
+ <ul class="operations">
+ <% if back %>
+ <li class="last"><%= link_to message('dashboard.back_to_dashboard'), {:action => 'index', :id => @dashboard.id } -%></li>
+ <% else %>
+ <% if @dashboard.editable_by?(current_user) %>
+ <li><%= link_to message('dashboard.configure_widgets'), {:action => 'configure', :id => @dashboard.id } -%></li>
+ <li><%= link_to message('dashboard.edit_layout'), {:action => 'edit_layout', :id => @dashboard.id } -%></li>
+ <% end %>
+ <% end %>
+ </ul>
+ <% end %>
+
+ <% if @snapshot %>
+ <div id="snapshot_title" class="page_title">
+ <h4>
+ <%= link_to_favourite(@project) -%> <%= "Version #{@snapshot.version} - " if @snapshot.version.present? -%><%= l @snapshot.created_at -%>
+ <% if @snapshot.project_snapshot.periods? %>
+ <form method="GET" action="<%= url_for :controller => 'dashboard', :action => 'index', :id => @resource.id -%>" style="display: inline" class="spacer-left">
+ <input type="hidden" name="did" value="<%= @dashboard.id -%>" />
+ <select id="select-comparison" name="period" onchange="submit()" class="small">
+ <option value=""><%= message('time_changes') -%>...</option>
+ <%= period_select_options(@snapshot, 1) -%>
+ <%= period_select_options(@snapshot, 2) -%>
+ <%= period_select_options(@snapshot, 3) -%>
+ <%= period_select_options(@snapshot, 4) -%>
+ <%= period_select_options(@snapshot, 5) -%>
+ </select>
+ </form>
+ <% end %>
+ </h4>
+ </div>
<% end %>
</div>
<table width="100%">
<% @widget_definitions.each_with_index do |definition, index| %>
<% if index%4==0 %><tr><% end %>
- <%= render :partial => 'detached/widget_definition', :locals => {:definition => definition, :dashboard_id => dashboard_id, :category => category} %>
+ <%= render :partial => 'widget_definition', :locals => {:definition => definition, :dashboard_id => dashboard_id, :category => category} %>
<% if index%4==3 %></tr><% end %>
<% end %>
<% for i in 0..(4-(@widget_definitions.size%4)) %>
</script>
<div id="dashboard">
- <%= render :partial => 'detached/header', :locals => {:back => true} %>
+ <%= render :partial => 'header', :locals => {:back => true} %>
<div id="widget_defs">
- <%= render :partial => 'detached/widget_definitions', :locals => {:dashboard_id => @dashboard.id, :category => @category} -%>
+ <%= render :partial => 'widget_definitions', :locals => {:dashboard_id => @dashboard.id, :category => @category} -%>
</div>
@dashboard.widgets.select { |widget| widget.column_index==index && widget.java_definition}.sort_by { |widget| widget.row_index }.each do |widget|
%>
<div class="block" id="block_<%= widget.id -%>">
- <%= render :partial => 'dashboard/configure_widget', :locals => {:widget => widget} %>
+ <%= render :partial => 'configure_widget', :locals => {:widget => widget} %>
</div>
<%
end
<div id="dashboard">
- <%= render :partial => 'detached/header', :locals => {:back => true} %>
+ <%= render :partial => 'header', :locals => {:back => true} %>
<div id="edit-layout" class="admin">
<p class="note"><%= message('dashboard.click_to_choose_layout') -%>: </p><br/>
<div id="dashboard">
- <%= render :partial => 'detached/header', :locals => {:back => false} %>
+ <%= render :partial => 'header', :locals => {:back => false} %>
<div style="width: 100%;display: block; float: none">
<%
columns=@dashboard.column_layout.split('-')
@dashboard.widgets.select { |widget| widget.column_index==index }.sort_by { |widget| widget.row_index }.each do |widget|
%>
<div class="block" id="block_<%= widget.id -%>">
- <%= render :partial => 'detached/widget', :locals => {:widget => widget} %>
+ <%= render :partial => 'widget', :locals => {:widget => widget} %>
</div>
<%
end