added the anchor to the code view in the revision view

This commit is contained in:
hyung-hwan 2018-10-24 08:17:05 +00:00
parent a1aac71736
commit 2b3c6c1b76

View File

@ -30,6 +30,7 @@
$revreqroot = ''; $revreqroot = '';
$history_path = "/code/history/{$project->id}/{$hex_headpath}"; $history_path = "/code/history/{$project->id}/{$hex_headpath}";
$code_path = "/code/file/{$project->id}/{$hex_headpath}";
} }
else else
{ {
@ -39,6 +40,7 @@
if ($hex_headpath == '') $revtrailer = $revreqroot; if ($hex_headpath == '') $revtrailer = $revreqroot;
else $revtrailer = "/{$hex_headpath}{$revreq}"; else $revtrailer = "/{$hex_headpath}{$revreq}";
$history_path = "/code/history/{$project->id}{$revtrailer}"; $history_path = "/code/history/{$project->id}{$revtrailer}";
$code_path = "/code/file/{$project->id}{$revtrailer}";
} }
$creole_base = site_url() . "/wiki/show/{$project->id}/"; $creole_base = site_url() . "/wiki/show/{$project->id}/";
@ -102,6 +104,11 @@ $(function() {
return false; return false;
}); });
$("#code_revision_code_button").button().click (function() {
$(location).attr ('href', codepot_merge_path("<?php print site_url(); ?>", '<?php print $code_path; ?>'));
return false;
});
<?php if ($can_edit): ?> <?php if ($can_edit): ?>
$('#code_revision_edit_revision_message_form').dialog ( $('#code_revision_edit_revision_message_form').dialog (
{ {
@ -661,6 +668,9 @@ $history = $file['history'];
$history_anchor_text = '<i class="fa fa-history"></i> ' . $this->lang->line('History'); $history_anchor_text = '<i class="fa fa-history"></i> ' . $this->lang->line('History');
print anchor ("#", $history_anchor_text, 'id="code_revision_history_button"'); print anchor ("#", $history_anchor_text, 'id="code_revision_history_button"');
$history_anchor_text = '<i class="fa fa-code"></i> ' . $this->lang->line('Code');
print anchor ("#", $history_anchor_text, 'id="code_revision_code_button"');
print '</div>'; print '</div>';
print '<div class="metadata-commit-date">'; print '<div class="metadata-commit-date">';