From e8d68110569ee7904c13fcaa91ce0a4d883cd52e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Jan 2020 08:25:47 +0800 Subject: [PATCH] * adjust for repo log page style. --- module/repo/control.php | 2 +- module/repo/css/log.css | 1 + module/repo/view/log.html.php | 13 +++++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 module/repo/css/log.css diff --git a/module/repo/control.php b/module/repo/control.php index 7192ea3ede..2cb0c38521 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -29,7 +29,7 @@ class repo extends control $this->scm = $this->app->loadClass('scm'); $this->repos = $this->repo->getRepoPairs(); - if(common::hasPriv('repo', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('repo', 'create'), " " . $this->lang->repo->create, '', "class='btn'"); + if(common::hasPriv('repo', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('repo', 'create'), " " . $this->lang->repo->create, '', "class='btn btn-primary'"); if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create'))); /* Unlock session for wait to get data of repo. */ diff --git a/module/repo/css/log.css b/module/repo/css/log.css new file mode 100644 index 0000000000..6ebb508f44 --- /dev/null +++ b/module/repo/css/log.css @@ -0,0 +1 @@ +#contentNav{display:none;} diff --git a/module/repo/view/log.html.php b/module/repo/view/log.html.php index ecdfaa78c9..fddd407aa1 100644 --- a/module/repo/view/log.html.php +++ b/module/repo/view/log.html.php @@ -24,7 +24,6 @@ echo '/' . ' ' . html::a($this->repo->createLink('log', "repoID=$repoID", "entry=" . $this->repo->encodePath($postPath)), trim($pathName, '/')); } echo '/' . ' ' . $fileName; - echo $repo->SCM == 'Git' ? " @ " . substr($revision, 0, 10) : " @ r" . $revision;; ?> @@ -44,9 +43,12 @@ - repo->revision?> - repo->date?> - repo->committer?> + repo->revision?> + SCM == 'Git'):?> + repo->commit?> + + repo->date?> + repo->committer?> repo->comment?> @@ -60,6 +62,9 @@ repo->createLink('revision', "repoID=$repoID&revision=" . $log->revision), substr($log->revision, 0, 10));?> + SCM == 'Git'):?> + commit?> + time;?> committer;?> comment;?>