<th>Name</th> <th>Description</th> <th>Group</th> <th>Columns</th> <th>Background Color</th> <th>Action</th> <th class="last"><input type="submit" class="btn btn-default" value="Export selected" onclick="$('#form_mass_export').submit(); deselectAll(); return false;" /></th> </tr> </thead> <tbody> <?php $first = TRUE; if ($filter_group_id == -1) { $dashboards = Dashboard::findAll(); } else { $dashboards = Dashboard::findAllByFilter($filter_group_id); } /* Filter Graphs */ foreach ($dashboards as $dashboard) { $dashboard_id = $dashboard->getDashboardId(); $graphs = Graph::findAll($dashboard_id); $number_of_lines = 0; foreach ($graphs as $graph) { $number_of_lines = $number_of_lines + Line::countAllByFilter($graph->getGraphId(), $filter_text); } $number_of_graphs = Graph::countAllByFilter($dashboard_id, $filter_text); ?> <?php if ($number_of_graphs > 0 || $number_of_lines > 0 || preg_match('/' . $filter_text . '/i', $dashboard->getName()) || preg_match('/' . $filter_text . '/i', $dashboard->getDescription())) {
<div id="form_clone_into_<?php echo (int) $graph->getGraphId(); ?> " style="display:none;"> <form id="" method="post" action="<?php echo Graph::makeURL('clone_into', $graph); ?> " class="inline no-margin"> <input type="hidden" name="token" value="<?php echo fRequest::generateCSRFToken("/graphs.php"); ?> " /> Select destination : <select name="dashboard_dest_id"> <?php foreach (Dashboard::findAll() as $dashboard_dest) { if ($dashboard_dest->prepareDashboardId() != $graph->prepareDashboardId()) { ?> <option value="<?php echo (int) $dashboard_dest->getDashboardId(); ?> "><?php echo $dashboard_dest->prepareName(); ?> </option> <?php } } ?> </select> <input type="submit" value="Clone !" class="btn btn-primary"/>