* Finish productplan kanban.

This commit is contained in:
wangyuting
2023-11-13 05:34:32 +00:00
parent 6ee4f4562d
commit 49cc2f4481
4 changed files with 18 additions and 46 deletions
-5
View File
@@ -939,11 +939,6 @@ class kanbanModel extends model
$item['actionList'] = array();
foreach($cardActions as $action)
{
if($action == 'createExecution')
{
if(common::hasPriv('execution', 'create')) $item['actionList'][] = $action;
continue;
}
if($this->productplan->isClickable($plan, $action)) $item['actionList'][] = $action;
}
$planList[$id][$plan->status][] = $item;
+6 -28
View File
@@ -145,34 +145,6 @@ $(document).on('click', '#createExecutionButton', function()
zui.Modal.hide('#createExecutionModal');
});
window.getPlanID = function(event)
{
const planID = $(event.target).closest('a').data('plan');
const branch = $(event.target).closest('a').data('branch');
$('[name=planID]').val(planID);
const link = $.createLink('productplan', 'ajaxGetProjects', 'productID=' + productID + '&branch=' + (branch ? branch : 0));
$.getJSON(link, function(projects)
{
$('[name=project]').zui('picker').render({items: projects});
var projectList = $("[name=project]").val();
if(!projectList)
{
$("#programs").zui('picker').render({disabled: true});
$(".tips").removeClass('hidden');
var locateLink = $.createLink('product', 'project', 'status=all&productID=' + productID + '&branch=' + branch);
var locateButton = "<a href=" + locateLink + " class='btn btn-primary' data-app='product'>" + enterProjectList + "</a>";
$("#projects .btn-primary").replaceWith(locateButton);
}
else
{
$(".tips").addClass('hidden');
}
});
}
/**
* 对部分列进行重定义。
* Redefine the partial column.
@@ -337,3 +309,9 @@ window.buildCardActions = function(item)
return actions;
}
window.getPlanID = function(event)
{
const planID = $(event.target).closest('a').data('plan');
$('[name=planID]').val(planID);
}
+12 -1
View File
@@ -9,6 +9,17 @@ declare(strict_types=1);
* @link https://www.zentao.net
*/
namespace zin;
$privs = array
(
'canViewPlan' => common::hasPriv($app->rawModule, 'view'),
'canStartPlan' => common::hasPriv($app->rawModule, 'start'),
'canClosePlan' => common::hasPriv($app->rawModule, 'close'),
'canFinishPlan' => common::hasPriv($app->rawModule, 'finish'),
'canActivatePlan' => common::hasPriv($app->rawModule, 'activate')
);
jsVar('productID', $productID);
jsVar('productID', $productID);
jsVar('productplanLang', $lang->productplan);
jsVar('privs', $privs);
jsVar('rawModule', $app->rawModule);
include("browseby{$viewType}.html.php");
@@ -9,15 +9,6 @@ declare(strict_types=1);
* @link https://www.zentao.net
*/
namespace zin;
$privs = array
(
'canViewPlan' => common::hasPriv($app->rawModule, 'view'),
'canStartPlan' => common::hasPriv($app->rawModule, 'start'),
'canClosePlan' => common::hasPriv($app->rawModule, 'close'),
'canFinishPlan' => common::hasPriv($app->rawModule, 'finish'),
'canActivatePlan' => common::hasPriv($app->rawModule, 'activate')
);
foreach($kanbanList as $current => $region)
{
foreach($region['items'] as $index => $group)
@@ -39,9 +30,6 @@ foreach($lang->productplan->orderList as $order => $label)
$orderItems[] = array('text' => $label, 'active' => $orderBy == $order, 'url' => $this->createLink($app->rawModule, 'browse', "productID=$productID&branch=$branchID&browseType=$browseType&queryID=$queryID&orderBy=$order"));
}
jsVar('privs', $privs);
jsVar('productplanLang', $lang->productplan);
jsVar('rawModule', $app->rawModule);
toolbar
(
set::className('w-full justify-end'),