Permalink
Browse files

Merge branch '6.2.4' into stable

  • Loading branch information...
2 parents 144775b + 6926cd6 commit 895f39cff0eaca9142f4252413973c5904cea6cb @jstanden jstanden committed Feb 19, 2013
@@ -46,8 +46,8 @@
* - Jeff Standen, Darren Sugita, Dan Hildebrandt, Scott Luther
* WEBGROUP MEDIA LLC. - Developers of Cerberus Helpdesk
*/
-define("APP_BUILD", 2013012901);
-define("APP_VERSION", '6.2.3');
+define("APP_BUILD", 2013021801);
+define("APP_VERSION", '6.2.4');
define("APP_MAIL_PATH", APP_STORAGE_PATH . '/mail/');
View
@@ -409,15 +409,14 @@ static function get($extension_id) {
abstract function renderConfig(Model_WorkspaceWidget $widget);
abstract function saveConfig(Model_WorkspaceWidget $widget);
- // [TODO] This probably has a better home
public static function getParamsViewModel($widget, $params) {
$view_model = null;
if(isset($params['view_model'])) {
$view_model_encoded = $params['view_model'];
$view_model = unserialize(base64_decode($view_model_encoded));
}
-
+
if(empty($view_model)) {
@$view_id = $params['view_id'];
@$view_context = $params['view_context'];
@@ -435,11 +434,18 @@ public static function getParamsViewModel($widget, $params) {
$view->id = $view_id;
$view->is_ephemeral = true;
$view->renderFilters = false;
-
+
$view_model = C4_AbstractViewLoader::serializeAbstractView($view);
}
}
+ if(isset($view_model->placeholderValues)
+ && isset($view_model->placeholderValues['current_worker_id'])) {
+ $active_worker = CerberusApplication::getActiveWorker();
+
+ $view_model->placeholderValues['current_worker_id'] = !empty($active_worker) ? $active_worker->id : 0;
+ }
+
return $view_model;
}
};
@@ -737,7 +737,7 @@ function getMeta($context_id) {
return array(
'id' => $entry->id,
- 'name' => CerberusContexts::formatActivityLogEntry(json_decode($entry,true), 'text'),
+ 'name' => CerberusContexts::formatActivityLogEntry(json_decode($entry->entry_json, true), 'text'),
'permalink' => null,
);
}
@@ -652,6 +652,8 @@ function chooserOpenParamsAction() {
return;
}
+ // Add placeholders
+
if(!empty($trigger_id) && null != ($trigger = DAO_TriggerEvent::get($trigger_id))) {
$event = $trigger->getEvent();
@@ -674,6 +676,20 @@ function chooserOpenParamsAction() {
}
$view->setPlaceholderLabels($conditions);
+
+ } elseif(null != $active_worker = CerberusApplication::getActiveWorker()) {
+ $labels = array();
+ $values = array();
+
+ $labels['current_worker_id'] = array(
+ 'label' => 'Current Worker',
+ 'context' => CerberusContexts::CONTEXT_WORKER,
+ );
+
+ $values['current_worker_id'] = $active_worker->id;
+
+ $view->setPlaceholderLabels($labels);
+ $view->setPlaceholderValues($values);
}
C4_AbstractViewLoader::setView($view->id, $view);
@@ -14,7 +14,7 @@
{if !empty($placeholders)}
<optgroup label="Placeholders">
{foreach from=$placeholders item=label key=placeholder}
- <option value="{$placeholder}">{$label}</option>
+ <option value="{$placeholder}" {if $params.from_address_id==$placeholder}selected="selected"{/if}>{$label}</option>
{/foreach}
</optgroup>
{/if}
@@ -5,5 +5,5 @@
<br>
{foreach from=$options item=opt key=k}
-<label><input type="checkbox" name="{$namePrefix}[values][]" value="{$k}" {if in_array($opt,$params.values)}checked="checked"{/if}> {$opt}</label><br>
+<label><input type="checkbox" name="{$namePrefix}[values][]" value="{$k}" {if in_array($k,$params.values)}checked="checked"{/if}> {$opt}</label><br>
{/foreach}
@@ -183,15 +183,15 @@
<extension point="cerberusweb.ui.workspace.tab">
<id>cerberusweb.kb.tab.browse</id>
- <name>Browse KB Tab</name>
+ <name>Knowledgebase Browser Tab</name>
<class>
<file>api/App.php</file>
<name>WorkspaceTab_KbBrowse</name>
</class>
<params>
<param key="label" value="kb.workspace.tab.browser" />
</params>
- </extension>
+ </extension>
<!-- Profile Page Sections -->
Oops, something went wrong.

0 comments on commit 895f39c

Please sign in to comment.