* Adjust major action.
This commit is contained in:
@@ -23,3 +23,9 @@ $config->action->objectNameFields['entry'] = 'name';
|
||||
$config->action->objectNameFields['webhook'] = 'name';
|
||||
|
||||
$config->action->commonImgSize = 870;
|
||||
|
||||
$config->action->majorList = array();
|
||||
$config->action->majorList['task'] = array('assigned', 'finished', 'activated');
|
||||
$config->action->majorList['bug'] = array('assigned', 'resolved');
|
||||
$config->action->majorList['release'] = array('opened');
|
||||
$config->action->majorList['build'] = array('opened');
|
||||
|
||||
@@ -782,6 +782,8 @@ class actionModel extends model
|
||||
{
|
||||
$action->objectLink = '';
|
||||
}
|
||||
|
||||
$action->major = (isset($this->config->action->majorList[$action->objectType]) && in_array($action->action, $this->config->action->majorList[$action->objectType])) ? 1 : 0;
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{
|
||||
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
|
||||
if($action->action == 'login' or $action->action == 'logout' or empty($action->objectLink)) $action->objectName = $action->objectLabel = '';
|
||||
$class = $action->actor == $this->app->user->account ? "class='active'" : '';
|
||||
$class = $action->major ? "class='active'" : '';
|
||||
echo "<li $class><div>";
|
||||
printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName);
|
||||
echo "</div></li>";
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="panel-body">
|
||||
<ul class="timeline timeline-tag-left">
|
||||
<?php foreach($actions as $action):?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->date;?></span>
|
||||
<span class="timeline-text"><?php echo zget($users, $action->actor) . ' ' . $action->actionLabel . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName);?></span>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class="panel-body">
|
||||
<ul class="timeline timeline-tag-left">
|
||||
<?php foreach($actions as $action):?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->date;?></span>
|
||||
<span class="timeline-text"><?php echo zget($users, $action->actor) . ' ' . $action->actionLabel . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName);?></span>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->actor == $this->app->user->account) echo "class='active'";?>>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
Reference in New Issue
Block a user