diff --git a/module/repo/config/dtable.php b/module/repo/config/dtable.php index d0a12d846e..cbefd6998a 100644 --- a/module/repo/config/dtable.php +++ b/module/repo/config/dtable.php @@ -276,13 +276,16 @@ $config->repo->dtable->tag = new stdclass(); $config->repo->dtable->tag->fieldList['name']['title'] = $lang->repo->tag; $config->repo->dtable->tag->fieldList['name']['type'] = 'title'; $config->repo->dtable->tag->fieldList['name']['name'] = 'name'; +$config->repo->dtable->tag->fieldList['name']['fixed'] = 0; +$config->repo->dtable->tag->fieldList['name']['width'] = 250; $config->repo->dtable->tag->fieldList['name']['order'] = 10; $config->repo->dtable->tag->fieldList['name']['group'] = 1; -$config->repo->dtable->tag->fieldList['message']['title'] = $lang->repo->comment; -$config->repo->dtable->tag->fieldList['message']['type'] = 'text'; -$config->repo->dtable->tag->fieldList['message']['order'] = 70; -$config->repo->dtable->tag->fieldList['message']['group'] = 3; +$config->repo->dtable->tag->fieldList['createdDate']['title'] = $lang->repo->openedDate; +$config->repo->dtable->tag->fieldList['createdDate']['type'] = 'datetime'; +$config->repo->dtable->tag->fieldList['createdDate']['formatDate'] = 'YYYY-MM-dd hh:mm'; +$config->repo->dtable->tag->fieldList['createdDate']['order'] = 30; +$config->repo->dtable->tag->fieldList['createdDate']['group'] = 1; $config->repo->dtable->tag->fieldList['commitID']['title'] = $lang->repo->sourceCommit; $config->repo->dtable->tag->fieldList['commitID']['link'] = helper::createLink('repo', 'revision', 'repoID={repoID}&objectID=0&revision={commitID}'); @@ -290,14 +293,14 @@ $config->repo->dtable->tag->fieldList['commitID']['data-app'] = $app->tab; $config->repo->dtable->tag->fieldList['commitID']['type'] = 'desc'; $config->repo->dtable->tag->fieldList['commitID']['flex'] = 0; $config->repo->dtable->tag->fieldList['commitID']['sortType'] = true; -$config->repo->dtable->tag->fieldList['commitID']['order'] = 40; -$config->repo->dtable->tag->fieldList['commitID']['width'] = 130; +$config->repo->dtable->tag->fieldList['commitID']['order'] = 50; +$config->repo->dtable->tag->fieldList['commitID']['width'] = 100; $config->repo->dtable->tag->fieldList['commitID']['group'] = 2; $config->repo->dtable->tag->fieldList['committer']['title'] = $lang->repo->lastCommitter; $config->repo->dtable->tag->fieldList['committer']['type'] = 'user'; $config->repo->dtable->tag->fieldList['committer']['sortType'] = true; -$config->repo->dtable->tag->fieldList['committer']['order'] = 50; +$config->repo->dtable->tag->fieldList['committer']['order'] = 60; $config->repo->dtable->tag->fieldList['committer']['width'] = 100; $config->repo->dtable->tag->fieldList['committer']['group'] = 2; @@ -305,9 +308,14 @@ $config->repo->dtable->tag->fieldList['date']['title'] = $lang->repo->time; $config->repo->dtable->tag->fieldList['date']['name'] = 'date'; $config->repo->dtable->tag->fieldList['date']['type'] = 'datetime'; $config->repo->dtable->tag->fieldList['date']['formatDate'] = 'YYYY-MM-dd hh:mm'; -$config->repo->dtable->tag->fieldList['date']['order'] = 60; +$config->repo->dtable->tag->fieldList['date']['order'] = 70; $config->repo->dtable->tag->fieldList['date']['group'] = 2; +$config->repo->dtable->tag->fieldList['message']['title'] = $lang->repo->comment; +$config->repo->dtable->tag->fieldList['message']['type'] = 'text'; +$config->repo->dtable->tag->fieldList['message']['order'] = 40; +$config->repo->dtable->tag->fieldList['message']['group'] = 1; + $config->repo->dtable->branch = new stdclass(); $config->repo->dtable->branch->fieldList['name']['title'] = $lang->repo->branch; $config->repo->dtable->branch->fieldList['name']['type'] = 'title'; diff --git a/module/repo/control.php b/module/repo/control.php index fd08e9c1fb..2543c46db6 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -1848,7 +1848,9 @@ class repo extends control $this->scm->setEngine($repo); $tagList = $this->scm->tags('all'); - $committers = $this->loadModel('user')->getCommiters('account'); + + $committers = $this->loadModel('user')->getCommiters('account'); + $showCreatedDate = false; foreach($tagList as $index => &$tag) { $tag->repoID = $repoID; @@ -1864,6 +1866,10 @@ class repo extends control $tag->createdBy = isset($tag->tagger->identity->name) ? zget($committers, $tag->tagger->identity->name) : ''; + $tag->createdDate = isset($tag->tagger->when) ? date('Y-m-d H:i:s', strtotime($tag->tagger->when)) : ''; + if(isset($tag->created_at)) $tag->createdDate = date('Y-m-d H:i:s', strtotime($tag->created_at)); + if($tag->createdDate) $showCreatedDate = true; + $tag->date = isset($tag->commit->committed_date) ? date('Y-m-d H:i:s', strtotime($tag->commit->committed_date)) : ''; if(isset($tag->tagger->when)) $tag->date = date('Y-m-d H:i:s', strtotime($tag->tagger->when)); @@ -1876,6 +1882,7 @@ class repo extends control } if($orderList) array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $tagList); + if(!$showCreatedDate) unset($this->config->repo->dtable->tag->fieldList['createdDate']); /* Pager. */ $this->app->loadClass('pager', true); diff --git a/module/repo/lang/de.php b/module/repo/lang/de.php index 12784a3ef2..6a328dd187 100644 --- a/module/repo/lang/de.php +++ b/module/repo/lang/de.php @@ -146,7 +146,7 @@ $lang->repo->lastSubmitTime = 'Final submission time'; $lang->repo->lastCommitter = 'committer'; $lang->repo->lastUpdateTime = 'Last update time'; $lang->repo->createdBy = 'Created by'; -$lang->repo->sourceCommit = 'Source Commit'; +$lang->repo->sourceCommit = 'Commit'; $lang->repo->relations = 'Relations'; $lang->repo->story = 'Story'; $lang->repo->searchTips = 'Search by %s'; diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php index 7a931badfb..51ffe9200d 100644 --- a/module/repo/lang/en.php +++ b/module/repo/lang/en.php @@ -146,7 +146,7 @@ $lang->repo->lastSubmitTime = 'Final submission time'; $lang->repo->lastCommitter = 'committer'; $lang->repo->lastUpdateTime = 'Last update time'; $lang->repo->createdBy = 'Created by'; -$lang->repo->sourceCommit = 'Source Commit'; +$lang->repo->sourceCommit = 'Commit'; $lang->repo->relations = 'Relations'; $lang->repo->story = 'story'; $lang->repo->searchTips = 'Search by %s'; diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php index b0bebda6cb..513d73c7e0 100644 --- a/module/repo/lang/fr.php +++ b/module/repo/lang/fr.php @@ -146,7 +146,7 @@ $lang->repo->lastSubmitTime = 'Final submission time'; $lang->repo->lastCommitter = 'committer'; $lang->repo->lastUpdateTime = 'Last update time'; $lang->repo->createdBy = 'Created by'; -$lang->repo->sourceCommit = 'Source Commit'; +$lang->repo->sourceCommit = 'Commit'; $lang->repo->relations = 'Relations'; $lang->repo->story = 'Story'; $lang->repo->searchTips = 'Search by %s';