From 2b3c6c1b765e9c2bc285c93e82f9f247cf030e2f Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 24 Oct 2018 08:17:05 +0000 Subject: [PATCH] added the anchor to the code view in the revision view --- codepot/src/codepot/views/code_revision.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codepot/src/codepot/views/code_revision.php b/codepot/src/codepot/views/code_revision.php index 86ab21aa..9125e111 100644 --- a/codepot/src/codepot/views/code_revision.php +++ b/codepot/src/codepot/views/code_revision.php @@ -30,6 +30,7 @@ $revreqroot = ''; $history_path = "/code/history/{$project->id}/{$hex_headpath}"; + $code_path = "/code/file/{$project->id}/{$hex_headpath}"; } else { @@ -39,6 +40,7 @@ if ($hex_headpath == '') $revtrailer = $revreqroot; else $revtrailer = "/{$hex_headpath}{$revreq}"; $history_path = "/code/history/{$project->id}{$revtrailer}"; + $code_path = "/code/file/{$project->id}{$revtrailer}"; } $creole_base = site_url() . "/wiki/show/{$project->id}/"; @@ -102,6 +104,11 @@ $(function() { return false; }); + $("#code_revision_code_button").button().click (function() { + $(location).attr ('href', codepot_merge_path("", '')); + return false; + }); + $('#code_revision_edit_revision_message_form').dialog ( { @@ -661,6 +668,9 @@ $history = $file['history']; $history_anchor_text = ' ' . $this->lang->line('History'); print anchor ("#", $history_anchor_text, 'id="code_revision_history_button"'); + + $history_anchor_text = ' ' . $this->lang->line('Code'); + print anchor ("#", $history_anchor_text, 'id="code_revision_code_button"'); print ''; print '
';