diff --git a/include/class.queue.php b/include/class.queue.php index 3ad133f9116c75ab4d81e0c8c6bc12d84c07ed14..9838ee72664ba40265a977f4734a324a76673bec 100644 --- a/include/class.queue.php +++ b/include/class.queue.php @@ -76,10 +76,6 @@ class CustomQueue extends SavedSearch { )); } - function inheritCriteria() { - return $this->flags & self::FLAG_INHERIT_CRITERIA; - } - function getBasicQuery($form=false) { if ($this->parent && $this->inheritCriteria()) { $query = $this->parent->getBasicQuery(); diff --git a/include/staff/queue.inc.php b/include/staff/queue.inc.php index 36eff7912446675921e48369a8f968e945fffc50..36d90cf34036205442ba0baea38ab3680308c66a 100644 --- a/include/staff/queue.inc.php +++ b/include/staff/queue.inc.php @@ -56,9 +56,19 @@ else { <br/> <br/> <div><strong><?php echo __("Queue Search Criteria"); ?></strong></div> - <div><input type="checkbox" class="checkbox" name="inherit" <?php + <label class="checkbox" style="line-height:1.3em"> + <input type="checkbox" class="checkbox" name="inherit" <?php if ($queue->inheritCriteria()) echo 'checked="checked"'; - ?>/> <?php echo __('Include parent search criteria'); ?></div> + ?>/> + <?php echo __('Include parent search criteria'); + if ($queue->parent) { ?> + <span id="parent_q_crit" class="faded"> + <i class="icon-caret-right"></i> + <br/><?php + echo $queue->parent->describeCriteria(); + ?></span> +<?php } ?> + </label> <hr/> <div class="error"><?php echo $errors['criteria']; ?></div> <div class="advanced-search"> @@ -72,7 +82,9 @@ else { </td> <td style="width:35%; padding-left:40px; vertical-align:top"> <div><strong><?php echo __("Parent Queue"); ?>:</strong></div> - <select name="parent_id"> + <select name="parent_id" onchange="javascript: + $('#parent_q_crit').toggle($(this).find(':selected').val() + == <?php echo $queue->parent_id ?: 0; ?>);"> <option value="0">— <?php echo __('Top-Level Queue'); ?> —</option> <?php foreach (CustomQueue::queues() as $cq) { if ($cq->getId() == $queue->getId()) diff --git a/include/staff/templates/queue-column.tmpl.php b/include/staff/templates/queue-column.tmpl.php index 3b93d0e83c512c366a56f50f54bd13766b450722..bfdd25ce696747bc86f9aebcbaa437c4c960f4ea 100644 --- a/include/staff/templates/queue-column.tmpl.php +++ b/include/staff/templates/queue-column.tmpl.php @@ -21,23 +21,24 @@ $data_form = $data_form ?: $column->getDataConfigForm($_POST); ?> </div> -<div class="hidden tab_content" data-col-id="<?php echo $colid; ?>" +<div class="hidden tab_content" style="margin: 0 20px" + data-col-id="<?php echo $colid; ?>" id="annotations" style="max-width: 400px"> <div class="empty placeholder" style="margin-left: 20px"> <em><?php echo __('No annotations for this field'); ?></em> </div> - <div style="margin: 0 20px;"> - <div class="annotation clear template hidden"> + <div> + <div class="annotation clear template hidden" style="padding:3px 0"> <input data-field="input" data-name="annotations[]" value="" type="hidden" /> <input data-field="column" data-name="deco_column[]" value="" type="hidden" /> <i data-field="icon"></i> - <span data-field="name"></span> - <div class="pull-right"> - <select data-field="position" data-name="deco_pos[]"> + <div data-field="name" style="display: inline-block; width: 150px"></div> + <select data-field="position" data-name="deco_pos[]"> <?php foreach (QueueColumnAnnotation::getPositions() as $key=>$desc) { - echo sprintf('<option value="%s">%s</option>', $key, Format::htmlchars($desc)); + echo sprintf('<option value="%s">%s</option>', $key, Format::htmlchars($desc)); } ?> - </select> + </select> + <div class="pull-right"> <a href="#" data-field="delete" title="<?php echo __('Delete'); ?>" onclick="javascript: var tab = $(this).closest('.tab_content'), @@ -52,7 +53,7 @@ $data_form = $data_form ?: $column->getDataConfigForm($_POST); </div> </div> - <div style="margin-top: 20px"> + <div style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #bbb"> <i class="icon-plus-sign"></i> <select class="add-annotation"> <option>— <?php echo __("Add a annotation"); ?> —</option> @@ -111,10 +112,10 @@ foreach (Internationalization::sortKeyedList($annotations) as $class=>$desc) { </div> </div> -<div class="hidden tab_content" id="conditions"> - <div style="margin: 0 20px"><?php echo __("Conditions are used to change the view of the data in a row based on some conditions of the data. For instance, a column might be shown bold if some condition is met."); +<div class="hidden tab_content" id="conditions" style="margin: 0 20px"> + <div style="margin-bottom: 15px"><?php echo __("Conditions are used to change the view of the data in a row based on some conditions of the data. For instance, a column might be shown bold if some condition is met."); ?></div> - <div class="conditions" style="margin: 20px; max-width: 400px"> + <div class="conditions"> <?php if ($column->getConditions()) { $fields = SavedSearch::getSearchableFields($root); @@ -125,7 +126,7 @@ if ($column->getConditions()) { include STAFFINC_DIR . 'templates/queue-column-condition.tmpl.php'; } } ?> - <div style="margin-top: 20px"> + <div style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #bbb"> <i class="icon-plus-sign"></i> <select class="add-condition"> <option>— <?php echo __("Add a condition"); ?> —</option> diff --git a/scp/css/scp.css b/scp/css/scp.css index 8913828cd911578f6f3d5a67025b4f7e7a14436f..f5500a69f36a566ab88d3f98e128a4b0ba1eb868 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -3366,6 +3366,10 @@ label.inline.checkbox { label.checkbox + label.checkbox { margin-top: 0.3em; } +[class^="icon-"], [class*=" icon-"] { + /* Fix icons inside label.checkbox */ + text-indent: initial; +} input[type=checkbox] { width: 1em; height: 1em;