diff --git a/codepot/src/codepot/language/english/common_lang.php b/codepot/src/codepot/language/english/common_lang.php index 031c1da0..57708f32 100644 --- a/codepot/src/codepot/language/english/common_lang.php +++ b/codepot/src/codepot/language/english/common_lang.php @@ -112,6 +112,7 @@ $lang['System'] = 'System'; $lang['Tag'] = 'Tag'; $lang['Text'] = 'Text'; $lang['Time'] = 'Time'; +$lang['Toggle View'] = 'Toggle View'; $lang['Top committers'] = 'Top committers'; $lang['Top projects'] = 'Top projects'; $lang['Type'] = 'Type'; diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index ccabccbe..afe0e832 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -253,6 +253,11 @@ function showRawCode() function render_wiki_wc () { + $("#code_toggle_wc_view_button").button().click(function() { + $("#code_diff_old_code_view").toggle(); + $("#code_diff_new_code_view").toggleClass("code_file_full_width"); + return false; + }); creole_render_wiki ( "code_file_wiki_text", "code_diff_new_code_view", @@ -831,6 +836,7 @@ $this->load->view ( $download_anchor_text = ' ' . $this->lang->line('Download'); $diff_anchor_text = ' ' . $this->lang->line('Difference'); $fulldiff_anchor_text = ' ' . $this->lang->line('Full Difference'); + $toggle_wc_text = ' ' . $this->lang->line('Toggle View'); if ($file['created_rev'] != $file['head_rev']) { @@ -851,6 +857,8 @@ $this->load->view ( print $this->lang->line('CODE_REVISION_GRAPH'); print ''; + if ($is_wiki_file) { print anchor ('#', $toggle_wc_text, 'id="code_toggle_wc_view_button"'); } + print ''; print '