mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
reverted "Go back" href, added button to switch to quota report page (#1472568)
icons + buttons in quotareport.php fix minor differences between working installation and tree in shifttemplate.php
This commit is contained in:
@@ -204,16 +204,16 @@ if ($questionnaire_id)
|
|||||||
if ($completions < $v['completions']) //if completions less than the quota, allow for closing/opening
|
if ($completions < $v['completions']) //if completions less than the quota, allow for closing/opening
|
||||||
{
|
{
|
||||||
if ($v['quota_reached'] == 1)
|
if ($v['quota_reached'] == 1)
|
||||||
$status = "<a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&open=open'>" . T_("closed") . "</a>";
|
$status = "<span class='label label-default fa-lg'>" . T_("closed") . "</span><a class='btn' data-toggle='tooltip' title='" . T_("open") . "' href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&open=open'><i class='fa fa-lock fa-2x' style='color:red;'></i></a>";
|
||||||
else
|
else
|
||||||
$status = "<a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&close=close'>" . T_("open") . "</a>";
|
$status = "<span class='label label-primary fa-lg'>" . T_("open") . " </span><a class='btn' data-toggle='tooltip' title='" . T_("close") . "' href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&close=close'><i class='fa fa-unlock fa-2x'></i></a>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($v['quota_reached'] == 1)
|
if ($v['quota_reached'] == 1)
|
||||||
$status = T_("closed");
|
$status = "<span class='label label-default fa-lg'>" . T_("closed") . "</span>";
|
||||||
else
|
else
|
||||||
$status = T_("open");
|
$status = "<span class='label label-primary fa-lg'>" . T_("open") . " </span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$report[] = array("strata" => "<a href='quotarow.php?qsqri=$qsqr&edit=edit&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . $v['description'] . "</a>", "status" => $status, "quota" => $v['completions'], "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => $perc, "priority" => "<input type='number' maxlength='3' min='0' max='100' size='3' style='width:6em;' value='$priority' id='p$qsqr' name='p$qsqr' class='form-control'/>", "autoprioritise" => "  <input type='checkbox' id='a$qsqr' name='a$qsqr' $checked />");
|
$report[] = array("strata" => "<a href='quotarow.php?qsqri=$qsqr&edit=edit&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . $v['description'] . "</a>", "status" => $status, "quota" => $v['completions'], "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => $perc, "priority" => "<input type='number' maxlength='3' min='0' max='100' size='3' style='width:6em;' value='$priority' id='p$qsqr' name='p$qsqr' class='form-control'/>", "autoprioritise" => "  <input type='checkbox' id='a$qsqr' name='a$qsqr' $checked />");
|
||||||
@@ -302,7 +302,7 @@ if ($questionnaire_id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xhtml_foot();
|
xhtml_foot(array("../js/custom.js"));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -292,7 +292,6 @@ $sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id
|
|||||||
WHERE enabled = 1";
|
WHERE enabled = 1";
|
||||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id", true,false,true,true,false,true,"form-inline pull-left ");
|
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id", true,false,true,true,false,true,"form-inline pull-left ");
|
||||||
|
|
||||||
|
|
||||||
if ($questionnaire_id != false)
|
if ($questionnaire_id != false)
|
||||||
{
|
{
|
||||||
$sample_import_id = false;
|
$sample_import_id = false;
|
||||||
@@ -310,6 +309,9 @@ if ($questionnaire_id != false)
|
|||||||
} else {
|
} else {
|
||||||
print "<div class='clearfix'></div><div class='well text-info'>" . T_("No samples assigned to this questionnaire.") . "</div>";
|
print "<div class='clearfix'></div><div class='well text-info'>" . T_("No samples assigned to this questionnaire.") . "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<div class='col-sm-2 pull-right'><a href='quotareport.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-info btn-block'><i class='fa fa-filter fa-lg'></i> " . T_("To quota report") . "</a></div>";
|
||||||
|
|
||||||
print "<div class='clearfix'></div>";
|
print "<div class='clearfix'></div>";
|
||||||
|
|
||||||
|
|
||||||
@@ -380,7 +382,7 @@ if ($questionnaire_id != false)
|
|||||||
|
|
||||||
if ($qsqri != false)
|
if ($qsqri != false)
|
||||||
{
|
{
|
||||||
print "<h2 class='col-sm-2 '><a href='' onclick='history.back();return false;' class='btn btn-default'><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a></h2>";
|
print "<h2 class='col-sm-2'><a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default'><i class='fa fa-arrow-up fa-lg text-primary'></i> " . T_("To Row quotas") . "</a></h2>";
|
||||||
print "<h2>" . T_("Quota") . ": $qsqrid</h2>";
|
print "<h2>" . T_("Quota") . ": $qsqrid</h2>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ $sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT('$year',' ','$woy',' ',day_of_week
|
|||||||
$shifts = $db->GetAll($sql);
|
$shifts = $db->GetAll($sql);
|
||||||
translate_array($shifts,array("dt"));
|
translate_array($shifts,array("dt"));
|
||||||
|
|
||||||
$sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT('$year',' ','$woy',' ',day_of_week - 1),'%x %v %w'), '%W') as description, day_of_week as value, '' as selected
|
$sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT($year,' ',$woy,' ',day_of_week - 1),'%x %v %w'), '%W') as description, day_of_week as value, '' as selected
|
||||||
FROM day_of_week";
|
FROM day_of_week";
|
||||||
|
|
||||||
$daysofweek = $db->GetAll($sql);
|
$daysofweek = $db->GetAll($sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user