From 334a0b1009f39d14b333623c26fd3ef4e802b259 Mon Sep 17 00:00:00 2001 From: Catouse Date: Tue, 23 Feb 2016 16:55:50 +0800 Subject: [PATCH] * change UI of mail content for user. --- module/bug/view/sendmail.html.php | 41 +++-- module/common/view/mail.css.php | 10 -- module/common/view/mail.footer.html.php | 28 ++++ module/common/view/mail.header.html.php | 23 +++ module/common/view/mail.html.php | 11 -- module/project/view/sendmail.html.php | 41 +++-- module/report/control.php | 8 +- module/report/view/dailyreminder.html.php | 180 +++++++++++++--------- module/story/view/sendmail.html.php | 41 +++-- module/task/view/sendmail.html.php | 41 +++-- module/testtask/view/sendmail.html.php | 43 +++--- 11 files changed, 259 insertions(+), 208 deletions(-) create mode 100644 module/common/view/mail.footer.html.php create mode 100644 module/common/view/mail.header.html.php diff --git a/module/bug/view/sendmail.html.php b/module/bug/view/sendmail.html.php index 4308c4f34f..5f4e4e3584 100644 --- a/module/bug/view/sendmail.html.php +++ b/module/bug/view/sendmail.html.php @@ -10,27 +10,24 @@ * @link http://www.zentao.net */ ?> - - - - - - - - + + + + - - - - -
- BUG #id . "=>{$users[$bug->assignedTo]} " . html::a(common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> -
-
- bug->legendSteps;?> +id . ' ' . $bug->title;?> + +
+ + + + + +
BUG #id . '  ' . html::a(common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "style='color: #333'");?>createLink('bug', 'view', "bugID=$bug->id"), '[+]', 'target="_blank"');?>
+
+
+ bug->legendSteps;?>
steps;?>
-
- + + + diff --git a/module/common/view/mail.css.php b/module/common/view/mail.css.php index 00157c5a4b..e69de29bb2 100644 --- a/module/common/view/mail.css.php +++ b/module/common/view/mail.css.php @@ -1,10 +0,0 @@ - diff --git a/module/common/view/mail.footer.html.php b/module/common/view/mail.footer.html.php new file mode 100644 index 0000000000..f4db14c5b2 --- /dev/null +++ b/module/common/view/mail.footer.html.php @@ -0,0 +1,28 @@ + + + + getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> + actor])) $action->actor = $users[$action->actor];?> + extra])) $action->extra = $users[$action->extra];?> +  action->printAction($action);?> + + + comment) or !empty($action->history)):?> + + +
action->printChanges($action->objectType, $action->history);?>
+ comment)): ?> +

comment;?>

+ + + + + + + + + +   + + + diff --git a/module/common/view/mail.header.html.php b/module/common/view/mail.header.html.php new file mode 100644 index 0000000000..c3c6c51c43 --- /dev/null +++ b/module/common/view/mail.header.html.php @@ -0,0 +1,23 @@ + + + + +  +   +  <?php echo $mailTitle ?> +   +  + +   + + + + diff --git a/module/report/control.php b/module/report/control.php index fe3d63d381..9f1a5b69ee 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -187,15 +187,17 @@ class report extends control /* Reset $this->output. */ $this->clear(); - /* Get email content and title.*/ - $this->view->mail = $mail; - $mailContent = $this->parse('report', 'dailyreminder'); $mailTitle = $this->lang->report->mailtitle->begin; $mailTitle .= isset($mail->bugs) ? sprintf($this->lang->report->mailtitle->bug, count($mail->bugs)) : ''; $mailTitle .= isset($mail->tasks) ? sprintf($this->lang->report->mailtitle->task, count($mail->tasks)) : ''; $mailTitle .= isset($mail->todos) ? sprintf($this->lang->report->mailtitle->todo, count($mail->todos)) : ''; $mailTitle .= isset($mail->testTasks) ? sprintf($this->lang->report->mailtitle->testTask, count($mail->testTasks)) : ''; $mailTitle = rtrim($mailTitle, ','); + + /* Get email content and title.*/ + $this->view->mail = $mail; + $this->view->mailTitle = $mailTitle; + $mailContent = $this->parse('report', 'dailyreminder'); /* Send email.*/ echo date('Y-m-d H:i:s') . " sending to $user, "; diff --git a/module/report/view/dailyreminder.html.php b/module/report/view/dailyreminder.html.php index 64e75d3ecc..3dcadf4080 100755 --- a/module/report/view/dailyreminder.html.php +++ b/module/report/view/dailyreminder.html.php @@ -1,85 +1,119 @@ report->getSysURL();?> - + + + + + + bugs)):?> -
+ + + + + +
company->name ?>' />
+ diff --git a/module/common/view/mail.html.php b/module/common/view/mail.html.php index b29dbfc30c..e69de29bb2 100755 --- a/module/common/view/mail.html.php +++ b/module/common/view/mail.html.php @@ -1,11 +0,0 @@ -getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> -actor])) $action->actor = $users[$action->actor];?> -extra])) $action->extra = $users[$action->extra];?> -action->printAction($action);?> -comment) or !empty($action->history)):?> -
-
action->printChanges($action->objectType, $action->history);?>
-comment and $action->history) echo '
'; echo $action->comment;?> -
- - diff --git a/module/project/view/sendmail.html.php b/module/project/view/sendmail.html.php index b3f0b28c17..204ab0c3ee 100644 --- a/module/project/view/sendmail.html.php +++ b/module/project/view/sendmail.html.php @@ -10,27 +10,24 @@ * @link http://www.zentao.net */ ?> - - -
- - - - - + + + + - - - - -
- TASK #id . "=>$task->assignedTo " . html::a(common::getSysURL() . $this->createLink('task', 'view', "taskID=$task->id"), $task->name);?> -
-
- task->legendDesc;?> +id . ' ' . $task->name;?> + +
+ + + + + +
id . '  ' . html::a(common::getSysURL() . $this->createLink('task', 'view', "taskID=$task->id"), $task->name, '', "style='color: #333; text-decoration: none;'");?>createLink('task', 'view', "taskID=$task->id"), '[+]', 'target="_blank"');?>
+
+
+ task->legendDesc;?>
desc;?>
-
- +
+ + + + + +
createLink('my', 'index'), '[+]', 'target="_blank"');?>
+
- - - - - bugs as $bug):?> - - - - - -
report->idAB;?>report->bugTitle;?>
id;?> - createLink('bug', 'view', "bugID=$bug->id"); - if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); - echo html::a($url . $link, $bug->title); - ?> -
+ + +
report->mailtitle->bug, count($mail->bugs)), ',') ?>
+ + + + + + bugs as $bug):?> + + + + + +
report->idAB;?>report->bugTitle;?>
id;?> + createLink('bug', 'view', "bugID=$bug->id"); + if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); + echo html::a($url . $link, $bug->title); + ?> +
+ + tasks)):?> - - - - - - tasks as $task):?> - - - - - -
report->idAB;?>report->taskName;?>
id;?> - createLink('task', 'view', "taskID=$task->id"); - if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); - echo html::a($url . $link, $task->name); - ?> -
+ + +
report->mailtitle->task, count($mail->tasks)), ',') ?>
+ + + + + + tasks as $task):?> + + + + + +
report->idAB;?>report->taskName;?>
id;?> + createLink('task', 'view', "taskID=$task->id"); + if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); + echo html::a($url . $link, $task->name); + ?> +
+ + todos)):?> - - - - - - todos as $todo):?> - - - - - -
report->idAB;?>report->todoName;?>
id;?> - createLink('todo', 'view', "todoID=$todo->id"); - if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); - echo html::a($url . $link, $todo->name); - ?> -
+ + +
report->mailtitle->todo, count($mail->todos)), ',') ?>
+ + + + + + todos as $todo):?> + + + + + +
report->idAB;?>report->todoName;?>
id;?> + createLink('todo', 'view', "todoID=$todo->id"); + if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); + echo html::a($url . $link, $todo->name); + ?> +
+ + testTasks)):?> - - - - - - testTasks as $testTask):?> - - - - - -
report->idAB;?>report->testTaskName;?>
id;?> - createLink('testTask', 'view', "testTask=$testTask->id"); - if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); - echo html::a($url . $link, $testTask->name); - ?> -
+ + +
report->mailtitle->testTask, count($mail->testTasks)), ',') ?>
+ + + + + + testTasks as $testTask):?> + + + + + +
report->idAB;?>report->testTaskName;?>
id;?> + createLink('testTask', 'view', "testTask=$testTask->id"); + if($config->requestType == 'GET' and strpos($link, 'ztcli') !== false) $link = str_replace($this->server->php_self, $config->webRoot, $link); + echo html::a($url . $link, $testTask->name); + ?> +
+ + + + diff --git a/module/story/view/sendmail.html.php b/module/story/view/sendmail.html.php index b3195854c9..49f3de8f63 100644 --- a/module/story/view/sendmail.html.php +++ b/module/story/view/sendmail.html.php @@ -10,27 +10,24 @@ * @link http://www.zentao.net */ ?> - - - - - - - - + + + + - - - - -
- STORY #id . "=>$story->assignedTo " . html::a(common::getSysURL() . $this->createLink('story', 'view', "storyID=$story->id"), $story->title);?> -
-
- story->legendSpec;?> +id . ' ' . $story->title;?> + +
+ + + + + +
id . '  ' . html::a(common::getSysURL() . $this->createLink('story', 'view', "storyID=$story->id"), $story->title, '', "style='color: #333; text-decoration: none;'");?>createLink('story', 'view', "storyID=$story->id"), '[+]', 'target="_blank"');?>
+
+
+ story->legendSpec;?>
spec;?>
-
- + + + diff --git a/module/task/view/sendmail.html.php b/module/task/view/sendmail.html.php index f226abebbf..d3af7fc20e 100644 --- a/module/task/view/sendmail.html.php +++ b/module/task/view/sendmail.html.php @@ -10,27 +10,24 @@ * @link http://www.zentao.net */ ?> - - - - - - - - + + + + - - - - -
- TASK #id . "=>$task->assignedTo " . html::a(common::getSysURL() . $this->createLink('task', 'view', "taskID=$task->id"), $task->name);?> -
-
- task->legendDesc;?> +id . ' ' . $task->name;?> + +
+ + + + + +
id . '  ' . html::a(common::getSysURL() . $this->createLink('task', 'view', "taskID=$task->id"), $task->name, '', "style='color: #333; text-decoration: none;'");?>createLink('task', 'view', "taskID=$task->id"), '[+]', 'target="_blank"');?>
+
+
+ task->legendDesc;?>
desc;?>
-
- + + + diff --git a/module/testtask/view/sendmail.html.php b/module/testtask/view/sendmail.html.php index b896d2b574..6473b518c7 100644 --- a/module/testtask/view/sendmail.html.php +++ b/module/testtask/view/sendmail.html.php @@ -1,6 +1,6 @@ - - - - - - - - + + + + - - - - -
- TESTTASK #id . "=>$testtask->owner " . html::a(common::getSysURL() . $this->createLink('testtask', 'view', "testtaskID=$testtask->id"), $testtask->name);?> -
-
- testtask->desc;?> +id . ' ' . $testtask->name;?> + +
+ + + + + +
id . '  ' . html::a(common::getSysURL() . $this->createLink('testtask', 'view', "testtaskID=$testtask->id"), $testtask->name, '', "style='color: #333; text-decoration: none;'");?>createLink('testtask', 'view', "testtaskID=$testtask->id"), '[+]', 'target="_blank"');?>
+
+
+ testtask->desc;?>
desc;?>
-
- + + +