added the anchor to the code view in the revision view
This commit is contained in:
		| @ -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("<?php print site_url(); ?>", '<?php print $code_path; ?>')); | ||||
| 		return false; | ||||
| 	}); | ||||
|  | ||||
| <?php if ($can_edit): ?> | ||||
| 	$('#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'); | ||||
| 		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 class="metadata-commit-date">'; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user