fix embedded view

This commit is contained in:
Claude 2013-04-13 12:11:57 +02:00
parent c29711650e
commit da6858b211
3 changed files with 9 additions and 4 deletions

View File

@ -434,7 +434,7 @@ class Main extends CI_Controller
if ($check)
{
$data = $this->pastes->getPaste(3);
$data = $this->pastes->getPaste(3, true, $this->uri->segment(4) == 'diff');
$this->load->view('view/embed', $data);
}
else

View File

@ -18,7 +18,7 @@ $theme = $this->config->item('theme');
//Carabiner
$this->carabiner->config(array(
'script_dir' => 'themes/default/js/',
'script_dir' => 'themes/default/js/',
'style_dir' => 'themes/' . $theme . '/css/',
'cache_dir' => 'static/asset/',
'base_uri' => base_url(),

View File

@ -7,6 +7,7 @@ if(isset($title))
$page_title .= $title . ' - ';
}
$page_title .= $this->config->item('site_name');
$theme = $this->config->item('theme');
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@ -16,8 +17,8 @@ $page_title .= $this->config->item('site_name');
//Carabiner
$this->carabiner->config(array(
'script_dir' => 'static/js/',
'style_dir' => 'static/styles/',
'script_dir' => 'themes/default/js/',
'style_dir' => 'themes/' . $theme . '/css/',
'cache_dir' => 'static/asset/',
'base_uri' => base_url(),
'combine' => true,
@ -42,7 +43,11 @@ $this->carabiner->display('css');
<body>
<div class="paste">
<?php if($this->uri->segment(4) != 'diff'){ ?>
<p><a href="<?php echo site_url('view/' . $pid); ?>" target="_blank">This paste</a> brought to you by <a href="<?php echo base_url(); ?>" target="_blank"><?php echo $this->config->item('site_name'); ?></a>. <a class="right" href="<?php echo site_url('view/raw/' . $pid); ?>" target="_blank">View Raw</a></p>
<?php }else{ ?>
<p><a href="<?php echo site_url('view/' . $pid . '/diff'); ?>" target="_blank">This diff</a> of <a href="<?php echo site_url('view/' . $pid); ?>" target="_blank">that paste</a> brought to you by <a href="<?php echo base_url(); ?>" target="_blank"><?php echo $this->config->item('site_name'); ?></a>. <a class="right" href="<?php echo site_url('view/raw/' . $pid); ?>" target="_blank">View Raw</a></p>
<?php } ?>
<div class="text_formatted">
<div class="container">
<?php echo $paste; ?>