Exemplo n.º 1
0
 public function action_vars()
 {
     $this->response->headers('Content-Type', 'application/javascript; charset=utf-8');
     echo 'url = "' . cms::url() . '/";';
     echo 'siteurl = "' . URL::site('/', true) . '/";';
     echo 'tinymceurl = "' . cms::url('media/libs/tiny_mce/tiny_mce.js') . '";';
     echo 'ajaxurl = "' . cms::url('ajax/', true) . '/";';
 }
Exemplo n.º 2
0
 public function get_icon()
 {
     switch ($this->ext) {
         case 'txt':
             $icon = 'text.png';
             break;
         case 'zip':
         case 'tar.gz':
         case 'tar.gz2':
         case 'rar':
         case '7z':
             $icon = 'archive.png';
             break;
         case 'doc':
         case 'docx':
         case 'rtf':
         case 'pdf':
             $icon = 'document.png';
             break;
         case 'xls':
         case 'xlsx':
         case 'xml':
             $icon = 'spreadsheet.png';
             break;
         case 'js':
         case 'css':
         case 'php':
             $icon = 'code.png';
             break;
         case 'ogg':
         case 'flv':
         case 'f4v':
         case 'wmv':
             $icon = 'video.png';
             break;
         case 'mp3':
         case 'wav':
             $icon = 'audio.png';
             break;
         default:
             $icon = 'default.png';
             break;
     }
     return cms::url('media/img/file-icons/' . $icon);
 }
Exemplo n.º 3
0
 public static function breadcrumbs($values)
 {
     $len = count($values);
     $html = '<ul class="breadcrumb">';
     $i = 1;
     $html .= '<li>';
     $html .= '<a href="' . cms::url() . '" title="CMS">CMS</a>';
     $html .= '</li>';
     foreach ($values as $name => $url) {
         if ($len == $i) {
             $html .= '<li class="active">' . $name . '</li>';
         } else {
             $html .= '<li><a href="' . $url . '" title="' . $name . '">' . $name . '</a></li>';
         }
         $i++;
     }
     $html .= '</ul>';
     return $html;
 }
Exemplo n.º 4
0
			<div class="widget">
				<div class="widget-header">
					<div class="pull-left widget-tool widget-tool-left widget-mover">
						<span class="glyphicon glyphicon-move"></i>
					</div>
					<h3 class="widget-title" data-bind="text:widgettype.display"></h3>
					<div class="widget-tool pull-right">
						<a href="#" class="block-deleter" data-bind="click:$parent.deleteWidget" title="Slet">
							<span class="glyphicon glyphicon-trash"></span>
						</a>
					</div>
				</div>
				<div class="widget-body">
					<div data-bind="if:loading()">
						<img src="<?php 
echo cms::url('media/img/ajax-loader-widget.gif');
?>
" alt="Loader" />
					</div>
					<div class="widget-content-holder">
						
						<?php 
// Site stats
?>
						<div data-bind="if:widgettype.type=='sitestats'">
							<p>
								New users the past 24 hours: <span data-bind="text:newusers"></span>
							</p>
							<p>
								Total number of pages: <span data-bind="text:pages"></span>
							</p>
Exemplo n.º 5
0
<?php

echo cms::breadcrumbs(array('Filer' => cms::url('files'), 'Rediger fil' => cms::url('files/edit/' . $file->id), 'Billedredigering' => ''));
?>

<div class="page-header">
	<h1>Rediger billede</h1>
</div>

<div class="row-fluid">
	<div class="span8">
		<p>
			Træk på billedet for at beskære
		</p>
		<input type="hidden" data-orgimg="<?php 
echo url::site('files/' . $file->filename());
?>
" id="imgdata" value="" />
		<div id="image" data-fileid="<?php 
echo $file->id;
?>
">
			<img id="theimg" data-angle="0" src="<?php 
echo url::site('files/' . $file->filename());
?>
" />
		</div>
		<div class="text-right">
			<a href="#" class="btn hide btn-primary" id="crop-btn">Beskær</a>
		</div>
	</div>
Exemplo n.º 6
0
<tr>
	<td><input type="checkbox" class="filecheck" name="file-<?php 
echo $file->id;
?>
" value="<?php 
echo $file->id;
?>
" /></td>
	<td class="file-thumbnail">
		<a href="<?php 
echo cms::url('files/edit/' . $file->id);
?>
" title="Rediger">
			<img src="<?php 
echo $file->is_image() ? $file->show(70, 70) : $file->get_icon();
?>
" />
		</a>
	</td>
	<td>
		<div class="control-group">
			<?php 
/*<div class="controls">
				<div class="input-append">
					<input class="filename" type="text" value="<?php echo $file->filename; ?>" /><span class="add-on">.<?php echo $file->ext; ?></span>
				</div>
			</div>*/
?>
			<div>
<?php 
echo $file->size();
Exemplo n.º 7
0
echo __('Settings');
?>
					</a>
				</li>
			</ul>
		</div>
		
		<div class="col-xs-12 col-md-10 col-md-offset-2" id="content">
			<div id="content-holder"></div>
			<footer class="row" id="footer"></footer>
		</div>
		
	</div>
</div>

<?php 
echo View::factory('Cms/Modals/filebrowser');
echo View::factory('Cms/Modals/fileeditor');
?>
<script>
	var sitelocale = '<?php 
echo site::jslocale();
?>
';
</script>
<?php 
echo HTML::script('cms/media/js/vendor/require.js', array('data-main' => cms::url('media/js/project.js')));
?>
</body>
</html>
Exemplo n.º 8
0
<?php 
echo $file->size();
if ($file->is_image()) {
    echo '<h4>Dimentioner</h4>';
    list($width, $height) = getimagesize('files/' . $file->filename());
    echo '<div>' . $width . ' x ' . $height . '</div>';
}
$blocks = $file->blocks->find_all();
if ((bool) $blocks->count()) {
    echo '<h4>Vedhæftet til</h4>';
    echo '<ul>';
    $ids = array();
    foreach ($blocks as $block) {
        if (!in_array($block->id, $ids)) {
            $ids[] = $block->id;
            echo '<li><a href="' . cms::url('content/edit/' . $block->content_id) . '">' . $block->content->title . '</a></li>';
        }
    }
    echo '</ul>';
}
?>

		</div>
		<div class="span10">
			
			<div class="control-group">
				<label for="file-filename">Filnavn</label>
				<div class="input-append">
					<input name="filename" class="span7" type="text" value="<?php 
echo $file->filename;
?>
Exemplo n.º 9
0
" title="<?php 
echo __('See content');
?>
" target="_blank">
			<span class="glyphicon glyphicon-eye-open"></span> <?php 
echo __('See content');
?>
		</a>
	</div>
	<h1>
		<?php 
echo __('Edit :contenttypetype_display', array(':contenttypetype_display' => strtolower($content->contenttypetype->display)));
?>
		<small>
			<a href="<?php 
echo cms::url('#/content/new/' . $content->contenttype_id . '/' . $content->contenttypetype_id);
?>
" class="btn btn-default btn-sm" title="<?php 
echo __('Add new :contenttype', array(':contenttype' => strtolower($content->contenttypetype->display)));
?>
">
				<?php 
echo __('Add new');
?>
			</a>
		</small>
	</h1>
</div>

<?php 
if ($content->splittest != 0) {