Skip to content

Commit

Permalink
Reapply our changes to the actionable plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jreyes33 committed Apr 26, 2016
1 parent cab4177 commit d76d987
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
23 changes: 11 additions & 12 deletions plugins/actionable/hooks/actionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@
class actionable {

private $media_filter;

private static $media_values = array(
101 => 'All',
102 => 'Actionable',
103 => 'Urgent',
104 => 'Action taken',
105 => 'Closed'
);
private $media_values;

/**
* Registers the main event add method
Expand All @@ -34,7 +27,13 @@ public function __construct()
$this->action_taken = "";
$this->action_summary = "";
$this->action_closed = "";

$this->media_values = array(
101 => Kohana::lang('ui_main.all'),
102 => Kohana::lang('actionable.actionable'),
103 => Kohana::lang('actionable.urgent'),
104 => Kohana::lang('actionable.action_taken'),
105 => Kohana::lang('actionable.action_closed')
);
// Hook into routing
Event::add('system.pre_controller', array($this, 'add'));
}
Expand Down Expand Up @@ -260,7 +259,7 @@ public function _feed_rss()
public function _map_main_filters()
{
echo '</div><h3>'.Kohana::lang('actionable.actionable').'</h3><ul>';
foreach (self::$media_values as $k => $val) {
foreach ($this->media_values as $k => $val) {
echo "<li><a id=\"media_$k\" href=\"#\"><span>$val</span></a></li>";
}
echo '</ul><div>';
Expand Down Expand Up @@ -583,7 +582,7 @@ private function _check_media_type()
$this->media_filter = explode(',',$this->media_filter);
}
// Keep only the
$this->media_filter = array_intersect(array_keys(self::$media_values), $this->media_filter);
$this->media_filter = array_intersect(array_keys($this->media_values), $this->media_filter);
}
}

Expand All @@ -598,4 +597,4 @@ private function _check_media_type()

}

new actionable;
new actionable;
3 changes: 2 additions & 1 deletion plugins/actionable/i18n/es_AR/actionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'action_summary_description' => 'Ha sido tomada alguna acción? Resumir la acción tomada o requerida',
'summary' => 'Resumen',
'action_needed' => 'Acción necesaria',
'action_urgent' => 'Es necesario actuar urgentemente'
'action_urgent' => 'Es necesario actuar urgentemente',
'action_closed' => 'Cerrado'
);
?>
4 changes: 1 addition & 3 deletions plugins/actionable/views/admin/actionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@
<li class="none-separator"><?php echo Kohana::lang('ui_main.location');?>:
<strong><?php echo $incident->location_name; ?></strong>, <strong><?php echo $country_name; ?></strong>
</li>
<li><?php echo Kohana::lang('ui_main.submitted_by');?>
<strong><?php echo $submit_by; ?></strong> via <strong><?php echo $submit_mode; ?></strong>
</li>
<li><?php echo Kohana::lang('ui_main.submitted_by', array($submit_by, $submit_mode));?></li>
</ul>
<ul class="links">
<li class="none-separator"><?php echo Kohana::lang('ui_main.categories');?>:
Expand Down

0 comments on commit d76d987

Please sign in to comment.