From 42bf53b7739ba5f66490c6aa0744d92f997bfd5c Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 17 May 2010 13:11:42 +0000 Subject: [PATCH] * fixed a bug in getFile() of the subversion model class * enhanced the code folder view --- .../codepot/language/english/code_lang.php | 1 + .../src/codepot/language/korean/code_lang.php | 3 +- .../src/codepot/models/subversionmodel.php | 2 +- codepot/src/codepot/views/code_file.php | 2 +- codepot/src/codepot/views/code_folder.php | 127 ++++++++++++------ codepot/src/codepot/views/code_revision.php | 6 +- codepot/src/codepot/views/project_home.php | 20 +-- codepot/src/codepot/views/site_home.php | 17 +-- codepot/src/codepot/views/taskbar.php | 38 +++++- codepot/src/css/code.css | 34 +++++ 10 files changed, 181 insertions(+), 69 deletions(-) diff --git a/codepot/src/codepot/language/english/code_lang.php b/codepot/src/codepot/language/english/code_lang.php index 1d50f50e..aca71e1f 100644 --- a/codepot/src/codepot/language/english/code_lang.php +++ b/codepot/src/codepot/language/english/code_lang.php @@ -3,5 +3,6 @@ $lang['CODE_COMMIT'] = 'Commit'; $lang['CODE_PROPERTIES'] = 'Properties'; $lang['CODE_PROPERTY'] = 'Property'; +$lang['CODE_MSG_COMMITTED_BY'] = 'Committed by %s'; $lang['CODE_MSG_COMMITTED_BY_ON'] = 'Committed by %s on %s'; ?> diff --git a/codepot/src/codepot/language/korean/code_lang.php b/codepot/src/codepot/language/korean/code_lang.php index c14f270c..dc57a51b 100644 --- a/codepot/src/codepot/language/korean/code_lang.php +++ b/codepot/src/codepot/language/korean/code_lang.php @@ -3,5 +3,6 @@ $lang['CODE_COMMIT'] = '커밋'; $lang['CODE_PROPERTIES'] = '속성'; $lang['CODE_PROPERTY'] = '속성'; -$lang['CODE_MSG_COMMITTED_BY_ON'] = '%s가 %s에 커밋함'; +$lang['CODE_MSG_COMMITTED_BY'] = '%s이(가) 커밋함'; +$lang['CODE_MSG_COMMITTED_BY_ON'] = '%s이(가) %s에 커밋함'; ?> diff --git a/codepot/src/codepot/models/subversionmodel.php b/codepot/src/codepot/models/subversionmodel.php index 827bcd53..85ae976c 100644 --- a/codepot/src/codepot/models/subversionmodel.php +++ b/codepot/src/codepot/models/subversionmodel.php @@ -87,7 +87,7 @@ class SubversionModel extends Model $fileinfo['type'] = 'dir'; $fileinfo['size'] = 0; $fileinfo['created_rev'] = $info[0]['revision']; - $fileinfo['last_author'] = $info[0]['last_changed_rev']; + $fileinfo['last_author'] = $info[0]['last_changed_author']; $fileinfo['content'] = $list; $fileinfo['logmsg'] = (count($log) > 0)? $log[0]['msg']: ''; return $fileinfo; diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index 3f2294c7..27746594 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -187,7 +187,7 @@ if ($fileext == '') $fileext = "html"
lang->line('Message') ?>
-
+
 
+ + + + + + + + + <?=htmlspecialchars($project->name)?> @@ -36,41 +72,6 @@ $this->load->view ( - - - - - - - -
@@ -114,19 +115,29 @@ $this->load->view ( ?>
+ +
+ lang->line('Revision')?>: + 0): ?> + | + lang->line('Details')?> + +
+ +
+ $b['name'])? -1: - ($a['name'] < $b['name'])? 1: 0; + return strcasecmp ($a['name'], $b['name']); } return ($a['type'] == 'dir')? -1: 1; } - if (count($file['content']) <= 0) + if ($file_count <= 0) { print $this->lang->line('MSG_NO_CODE_AVAIL'); } @@ -144,7 +155,6 @@ $this->load->view ( usort ($file['content'], 'comp_files'); - print '
'; print ''; print ''; print ''; @@ -226,10 +236,49 @@ $this->load->view ( } } print '
' . $this->lang->line('Name') . '
'; + + print '
'; + + print '
';
+		print '
'; + print $this->lang->line('CODE_COMMIT'); + print '
'; + printf ($this->lang->line('CODE_MSG_COMMITTED_BY'), $file['last_author']); + + print '
'; + print $this->lang->line('Message'); + print '
'; + print '
';
+		print htmlspecialchars ($file['logmsg']);
+		print '
'; + + if (array_key_exists('properties', $file) && count($file['properties']) > 0) + { + print '
'; + print $this->lang->line('CODE_PROPERTIES'); + print '
'; + + print '
    '; + foreach ($file['properties'] as $pn => $pv) + { + print '
  • '; + print htmlspecialchars($pn); + if ($pv != '') + { + print ' - '; + print htmlspecialchars($pv); + } + print '
  • '; + } + print '
'; + } + print '
'; } ?> +
+
diff --git a/codepot/src/codepot/views/code_revision.php b/codepot/src/codepot/views/code_revision.php index 583729c0..0633f68e 100644 --- a/codepot/src/codepot/views/code_revision.php +++ b/codepot/src/codepot/views/code_revision.php @@ -132,13 +132,11 @@ $history = $file['history']; print anchor ("code/file/{$project->id}/{$xpar}/{$history['rev']}", htmlspecialchars($p['path'])); print ''; - /* print ''; - print anchor ("code/blame/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Blame')); - print ' '; + //print anchor ("code/blame/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Blame')); + //print ' '; print anchor ("code/diff/{$project->id}/{$xpar}/{$history['rev']}", $this->lang->line('Difference')); print ''; - */ print ''; } diff --git a/codepot/src/codepot/views/project_home.php b/codepot/src/codepot/views/project_home.php index 8b7ef1f4..becb7ef6 100644 --- a/codepot/src/codepot/views/project_home.php +++ b/codepot/src/codepot/views/project_home.php @@ -1,9 +1,11 @@ + + - - - + + +