From dfe3f020662e8c6e80a2e745e7985783ae41ae9b Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 11 Apr 2024 14:06:15 +0800 Subject: [PATCH] * Unify the styles of import and export buttons. --- .../lite/execution/ext/ui/grouptask.html.php | 12 +++++----- extension/lite/execution/ext/ui/task.html.php | 11 +++++---- extension/lite/execution/ext/ui/tree.html.php | 24 +++++++++---------- module/bug/ui/browse.html.php | 2 +- module/execution/ui/bug.html.php | 2 +- module/execution/ui/story.html.php | 2 +- module/execution/ui/task.html.php | 9 ++++--- module/execution/ui/tree.html.php | 20 ++++++++-------- module/project/ui/bug.html.php | 2 +- 9 files changed, 45 insertions(+), 39 deletions(-) diff --git a/extension/lite/execution/ext/ui/grouptask.html.php b/extension/lite/execution/ext/ui/grouptask.html.php index 7dd762c11e..faa3a8deb4 100644 --- a/extension/lite/execution/ext/ui/grouptask.html.php +++ b/extension/lite/execution/ext/ui/grouptask.html.php @@ -90,24 +90,24 @@ toolbar ( hasPriv('task', 'report') ? item(set(array ( - 'text' => $lang->task->report->common, + 'class' => 'btn ghost', 'icon' => 'bar-chart', - 'class' => 'ghost', + 'text' => $lang->task->report->common, 'url' => createLink('task', 'report', "execution={$execution->id}&browseType={$browseType}") ))) : null, hasPriv('task', 'export') ? item(set(array ( - 'text' => $lang->export, + 'class' => 'btn ghost', 'icon' => 'export', - 'class' => 'ghost export', + 'text' => $lang->export, 'url' => createLink('task', 'export', "execution={$execution->id}&orderBy={$orderBy}&type={$browseType}"), 'data-toggle' => 'modal' ))) : null, !empty($importTaskItem) ? dropdown( btn( - setClass('ghost btn square btn-default'), + setClass('btn ghost'), set::icon('import'), - set::text($lang->import) + $lang->import ), set::items(array_filter(array($importTaskItem))), set::placement('bottom-end') diff --git a/extension/lite/execution/ext/ui/task.html.php b/extension/lite/execution/ext/ui/task.html.php index 06f8a4bfaf..81ac781588 100644 --- a/extension/lite/execution/ext/ui/task.html.php +++ b/extension/lite/execution/ext/ui/task.html.php @@ -54,20 +54,23 @@ toolbar hasPriv('task', 'report') ? item(set(array ( 'icon' => 'bar-chart', - 'class' => 'ghost', + 'class' => 'btn ghost', + 'text' => $lang->task->report->common, 'url' => createLink('task', 'report', "execution={$execution->id}&browseType={$browseType}") ))) : null, hasPriv('task', 'export') ? item(set(array ( 'icon' => 'export', - 'class' => 'ghost export', + 'class' => 'btn ghost', + 'text' => $lang->export, 'url' => createLink('task', 'export', "execution={$execution->id}&orderBy={$orderBy}&type={$browseType}"), 'data-toggle' => 'modal' ))) : null, $importItems ? dropdown( btn( - setClass('ghost btn square btn-default'), - set::icon('import') + setClass('btn ghost'), + set::icon('import'), + $lang->import ), set::items($importItems), set::placement('bottom-end') diff --git a/extension/lite/execution/ext/ui/tree.html.php b/extension/lite/execution/ext/ui/tree.html.php index fafac6e30c..6b45f95e32 100644 --- a/extension/lite/execution/ext/ui/tree.html.php +++ b/extension/lite/execution/ext/ui/tree.html.php @@ -39,28 +39,28 @@ toolbar ( hasPriv('task', 'report') ? item(set(array ( + 'class' => 'btn ghost', 'icon' => 'bar-chart', - 'text' => $lang->task->reportChart, - 'class' => 'ghost', + 'text' => $lang->task->report->common, 'url' => createLink('task', 'report', "execution={$executionID}&browseType={$browseType}") ))) : null, + hasPriv('task', 'export') ? item(set(array + ( + 'class' => 'btn ghost', + 'icon' => 'export', + 'text' => $lang->export, + 'url' => createLink('task', 'export', "execution={$executionID}&orderBy={$orderBy}&type=tree"), + 'data-toggle' => 'modal' + ))) : null, !empty($importTaskItem) ? dropdown( btn( - setClass('ghost btn square btn-default'), + setClass('btn ghost'), set::icon('import'), - set::text($lang->import) + $lang->import ), set::items(array_filter(array($importTaskItem))), set::placement('bottom-end') ) : null, - hasPriv('task', 'export') ? item(set(array - ( - 'icon' => 'export', - 'text' => $lang->export, - 'class' => 'ghost', - 'url' => createLink('task', 'export', "execution={$executionID}&orderBy={$orderBy}&type=tree"), - 'data-toggle' => 'modal' - ))) : null, hasPriv('task', 'create') ? item(set(array ( 'icon' => 'plus', diff --git a/module/bug/ui/browse.html.php b/module/bug/ui/browse.html.php index b104081d35..22e42cd611 100644 --- a/module/bug/ui/browse.html.php +++ b/module/bug/ui/browse.html.php @@ -70,7 +70,7 @@ if(!isonlybody()) ))) : null, hasPriv('bug', 'export') ? item(set(array ( - 'text' => $lang->bug->export, + 'text' => $lang->export, 'icon' => 'export', 'class' => 'ghost', 'url' => createLink('bug', 'export', "productID={$product->id}&browseType={$browseType}"), diff --git a/module/execution/ui/bug.html.php b/module/execution/ui/bug.html.php index 647169dac8..abc0cb6520 100644 --- a/module/execution/ui/bug.html.php +++ b/module/execution/ui/bug.html.php @@ -26,7 +26,7 @@ if($canExportBug) $exportItem = array ( 'icon' => 'export', 'class' => 'ghost', - 'text' => $lang->bug->export, + 'text' => $lang->export, 'data-toggle' => 'modal', 'url' => $this->createLink('bug', 'export', "productID={$productID}&browseType=&executionID={$execution->id}") ); diff --git a/module/execution/ui/story.html.php b/module/execution/ui/story.html.php index 05e27ecf39..c16113de86 100644 --- a/module/execution/ui/story.html.php +++ b/module/execution/ui/story.html.php @@ -121,7 +121,7 @@ $product ? toolbar ))) : null, hasPriv('story', 'export') ? item(set(array ( - 'text' => $lang->story->export, + 'text' => $lang->export, 'icon' => 'export', 'class' => 'ghost', 'url' => createLink('story', 'export', "productID={$product->id}&orderBy=$orderBy&executionID=$execution->id&browseType=$type&storyType=$storyType"), diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index 61be794404..88a822e0ce 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -68,6 +68,7 @@ toolbar ( 'icon' => 'bar-chart', 'class' => 'ghost', + 'text' => $lang->task->report->common, 'url' => createLink('task', 'report', "execution={$execution->id}&browseType={$browseType}") ))) : null, hasPriv('task', 'export') ? item(set(array @@ -75,12 +76,14 @@ toolbar 'icon' => 'export', 'class' => 'ghost export', 'url' => createLink('task', 'export', "execution={$execution->id}&orderBy={$orderBy}&type={$browseType}"), - 'data-toggle' => 'modal' + 'data-toggle' => 'modal', + 'text' => $lang->export ))) : null, $importItems ? dropdown( btn( - setClass('ghost btn square btn-default'), - set::icon('import') + setClass('ghost btn btn-default'), + set::icon('import'), + $lang->import ), set::items($importItems), set::placement('bottom-end') diff --git a/module/execution/ui/tree.html.php b/module/execution/ui/tree.html.php index 6d9ebc809b..c504cebbdc 100644 --- a/module/execution/ui/tree.html.php +++ b/module/execution/ui/tree.html.php @@ -50,10 +50,19 @@ toolbar hasPriv('task', 'report') ? item(set(array ( 'icon' => 'bar-chart', - 'text' => $lang->task->reportChart, + 'text' => $lang->task->report->common, 'class' => 'ghost', 'url' => createLink('task', 'report', "execution={$executionID}&browseType={$browseType}") ))) : null, + hasPriv('task', 'export') ? item(set(array + ( + 'icon' => 'export', + 'text' => $lang->export, + 'class' => 'ghost', + 'url' => createLink('task', 'export', "execution={$executionID}&orderBy={$orderBy}&type=tree"), + 'data-toggle' => 'modal', + 'data-size' => 'sm' + ))) : null, !empty($importItems) ? dropdown( btn( setClass('ghost btn btn-default'), @@ -63,15 +72,6 @@ toolbar set::items($importItems), set::placement('bottom-end') ) : null, - hasPriv('task', 'export') ? item(set(array - ( - 'icon' => 'export', - 'text' => $lang->export, - 'class' => 'ghost', - 'url' => createLink('task', 'export', "execution={$executionID}&orderBy={$orderBy}&type=tree"), - 'data-toggle' => 'modal', - 'data-size' => 'sm' - ))) : null, $canCreateTask ? item(set(array ( 'icon' => 'plus', diff --git a/module/project/ui/bug.html.php b/module/project/ui/bug.html.php index 9d81186f31..0a037d9750 100644 --- a/module/project/ui/bug.html.php +++ b/module/project/ui/bug.html.php @@ -22,7 +22,7 @@ toolbar ( hasPriv('bug', 'export') ? item(set(array ( - 'text' => $lang->bug->export, + 'text' => $lang->export, 'icon' => 'export', 'class' => 'ghost', 'url' => createLink('bug', 'export', "productID={$productID}&browseType=&projectID={$project->id}"),