summaryrefslogtreecommitdiffstats
path: root/system/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-07-17 00:21:19 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-07-17 00:21:19 +0200
commit170806775235beb2fd3ace4ca2d673b200c591d7 (patch)
treeed944bef5f87474fa65b3925b7fb25303f30a52f /system/application
parentf5f82fc1b0ae425240d46b101d45af91f322decf (diff)
add the currently used highlighting lang to the page
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'system/application')
-rw-r--r--system/application/models/file_mod.php5
-rw-r--r--system/application/views/file/html_header.php3
2 files changed, 7 insertions, 1 deletions
diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php
index 645858ecd..2c86aa41a 100644
--- a/system/application/models/file_mod.php
+++ b/system/application/models/file_mod.php
@@ -175,6 +175,11 @@ class File_mod extends Model {
$data['auto_link'] = site_url($id).'/';
$data['rmd_link'] = site_url($id.'/rmd');
header("Content-Type: text/html\n");
+ if ($mode) {
+ $data['current_highlight'] = $mode;
+ } else {
+ $data['current_highlight'] = $this->mime2extension($type);
+ }
echo $this->load->view('file/html_header', $data, true);
if ($mode == "rmd") {
echo '<td class="markdownrender">'."\n";
diff --git a/system/application/views/file/html_header.php b/system/application/views/file/html_header.php
index dfa08ad46..fcb89d76d 100644
--- a/system/application/views/file/html_header.php
+++ b/system/application/views/file/html_header.php
@@ -7,7 +7,8 @@
<body>
<div class="top_bar">
<a class="raw_link no" href="<?php echo $raw_link; ?>">Raw</a> |
- <a class="raw_link no" href="<?php echo $plain_link; ?>">Plain</a>
+ <a class="raw_link no" href="<?php echo $plain_link; ?>">Plain</a> |
+ Currently: <?php echo $current_highlight; ?>
<div style="float:right;">
<a class="raw_link no" href="<?php echo $auto_link; ?>">Code</a> |
<a class="raw_link no" href="<?php echo $rmd_link; ?>">Render Markdown</a>