dashboard.global_dashboards.description=These dashboards are displayed to anonymous users or users who have not customized their dashboards.
dashboard.project_dashboards.description=These dashboards are displayed to anonymous users or users who have not customized their dashboards.
dashboard.shared_dashboards.description=These dashboards can be added to default dashboards.
+dashboard.username.default=[Sonar]
#------------------------------------------------------------------------------
<thead>
<tr>
<th class="name"><%= message('name') -%></th>
- <th><%= message('shared_by') -%></th>
+ <th class="shared"><%= message('shared_by') -%></th>
<th class="order"><%= message('order') -%></th>
- <th class="right"><%= message('operations') -%></th>
+ <th class="operations"><%= message('operations') -%></th>
</tr>
</thead>
<tbody>
<% if active_dashboards.empty? %>
<tr class="even">
- <td colspan="4"><%= message('dashboard.no_dashboard') -%></td>
+ <td colspan="4" class="empty"><%= message('dashboard.no_dashboard') -%></td>
</tr>
<% else %>
<% active_dashboards.each_with_index do |active, index| %>
<div><%= h(active.name(true)) -%></div>
<div class="description"><%= active.dashboard.description -%></div>
</td>
- <td><%= h(active.dashboard.user.name) if active.dashboard.user %></td>
- <td>
+ <td class="shared">
+ <% if active.dashboard.shared %>
+ <%= h(active.dashboard.user_name || message('dashboard.username.default')) -%>
+ <% end %>
+ </td>
+ <td class="order">
<% if index > 0 %>
<%= link_to image_tag('blue-up.png'), {:action => :up, :id => active.id}, :method => :post, :id => "up-#{u active.name}" %>
<% else %>
<% end %>
<% if index < active_dashboards.size-1 %>
<%= link_to image_tag('blue-down.png'), {:action => :down, :id => active.id}, :method => :post, :id => "down-#{u active.name}" %>
- <% end %>
+ <% else %>
+ <%= image_tag('transparent_16.gif') %>
+ <% end %>
</td>
- <td class="thin nowrap right">
+ <td class="thin nowrap operations">
<% if active_dashboards.size() > 1 %>
<%= link_to 'Remove from defaults', {:action => :remove, :id => active.id}, {:confirm => 'Are you sure to remove it from default dashboards ?', :method => :post, :id => "remove-#{u active.name}", :class => 'link-action'} %>
<% end %>
<thead>
<tr>
<th class="name"><%= message('name') -%></th>
- <th><%= message('shared_by') -%></th>
- <th><%= message('global') -%></th>
- <th class="right"><%= message('operations') -%></th>
+ <th class="shared"><%= message('shared_by') -%></th>
+ <th class="global"><%= message('global') -%></th>
+ <th class="operations"><%= message('operations') -%></th>
</tr>
</thead>
<tbody>
<div><%= h(dashboard.name(true)) -%></div>
<div class="description"><%= dashboard.description -%></div>
</td>
- <td><%= h(dashboard.user.name) if dashboard.user -%></td>
- <td>
+ <td class="shared">
+ <% if dashboard.shared %>
+ <%= h(dashboard.user_name || message('dashboard.username.default')) -%>
+ <% end %>
+ </td>
+ <td class="global">
<%= boolean_icon(dashboard.global) -%>
</td>
- <td class="thin nowrap right">
+ <td class="thin nowrap operations">
<%= link_to 'Add to defaults', {:action => 'add', :id => dashboard.id}, {:method => :post, :id => "add-#{u dashboard.name}", :class => 'link-action'} %>
</td>
</tr>
<thead>
<tr>
<th class="name"><%= message('name') -%></th>
- <% if is_admin %>
- <th><%= message('shared') -%></th>
- <% end %>
+ <th class="shared"><%= message('shared_by') -%></th>
<th class="order"><%= message('order') -%></th>
- <th class="right"><%= message('operations') -%></th>
+ <th class="operations"><%= message('operations') -%></th>
</tr>
</thead>
<tbody>
<%= active.name(true) -%>
<div class="description"><%= h active.dashboard.description -%></div>
</td>
- <% if is_admin %>
- <td>
- <%= boolean_icon(active.dashboard.shared) -%>
- </td>
- <% end %>
- <td>
+ <td class="shared">
+ <% if active.dashboard.shared %>
+ <%= h(active.dashboard.user_name || message('dashboard.username.default')) -%>
+ <% end %>
+ </td>
+ <td class="order">
<% if index > 0 %>
<%= link_to image_tag('blue-up.png'), {:action => :up, :id => active.dashboard_id, :resource => params[:resource]}, :method => :post, :id => "up-#{u active.name}" %>
<% else %>
<% end %>
<% if index < @actives.size-1 %>
<%= link_to image_tag('blue-down.png'), {:action => :down, :id => active.dashboard_id, :resource => params[:resource]}, :method => :post, :id => "down-#{u active.name}" %>
- <% end %>
+ <% else %>
+ <%= image_tag('transparent_16.gif') %>
+ <% end %>
</td>
- <td class="thin nowrap right">
+ <td class="thin nowrap operations">
<% if active.editable_by?(current_user) %>
<%= link_to message('dashboard.configure_widgets'), {:controller => :dashboard, :action => :configure, :did => active.dashboard_id, :id => (params[:resource] unless active.global?)},
:id => "configure-#{u active.name}", :class => 'link-action' %>
<thead>
<tr>
<th class="name"><%= message('name') -%></th>
- <th><%= message('shared_by') -%></th>
- <th class="right"><%= message('operations') -%></th>
+ <th class="shared"><%= message('shared_by') -%></th>
+ <th class="order"> </th>
+ <th class="operations"><%= message('operations') -%></th>
</tr>
</thead>
<tbody>
<% if @shared_dashboards.nil? || @shared_dashboards.empty? %>
<tr class="even">
- <td colspan="5"><%= message('dashboard.no_dashboard') -%></td>
+ <td colspan="5" class="empty"><%= message('dashboard.no_dashboard') -%></td>
</tr>
<%
else
<%= dashboard.name(true) -%>
<div class="description"><%= h dashboard.description -%></div>
</td>
- <td>
- <%= dashboard.user_name -%>
+ <td class="shared">
+ <% if dashboard.shared %>
+ <%= h(dashboard.user_name || message('dashboard.username.default')) -%>
+ <% end %>
</td>
- <td class="thin nowrap right">
+ <td class="order"> </td>
+ <td class="thin nowrap operations">
<% if dashboard.editable_by?(current_user) %>
<%= link_to_remote message('edit'), {:update => "create_dashboard", :url => {:action => :edit, :id => dashboard.id, :resource => params[:resource]}},
{:id => "edit-#{u dashboard.name}", :method => :get, :class => 'link-action'} %>
margin-bottom: 50px;
}
-.admin_page th.name {
- width: 200px;
+.admin_page .empty {
+ font-style: italic;
}
-.admin_page th.order {
- width: 45px;
+.admin_page .operations {
+ width: 260px;
+ text-align: right;
+}
+
+.admin_page .shared {
+ width: 140px;
+ text-align: center;
+}
+
+.admin_page .order, .admin_page .global {
+ width: 60px;
+ text-align: center;
}
.admin_page .description {