Exemplo n.º 1
0
 function before()
 {
     parent::before();
     if ($this->request->action() !== 'login') {
         $this->check_access();
     }
     Assets::add('css', 'css/langify.css');
     Assets::add('js', 'js/langify.js');
 }
Exemplo n.º 2
0
 public function compose($view)
 {
     \Assets::add(['admin', 'offcanvas', 'datepicker', 'responsive-tables']);
     // Build menu tree for the top bar
     $menu = new Node('menu', [self::buildTree()->addChild(AdminPanelMenuComposer::buildTree())]);
     $rightmenu = new Node('rightmenu', [AdminPanelMenuComposer::buildSecondaryTree()]);
     // Pass menu to the view
     $view->with('menu', $menu->setRender(new FoundationTopBar())->purge())->with('rightmenu', $rightmenu->setRender(new FoundationTopBar())->purge());
 }
Exemplo n.º 3
0
 public function compose($view)
 {
     \Assets::add('admin');
     // Build menu tree for the top bar
     $menu = new Node('menu', [self::buildTree()->addChild(ReportsMenuComposer::buildTree())]);
     $rightmenu = new Node('rightmenu', [self::buildSecondaryTree()]);
     // Pass menu to the view
     $view->with('menu', $menu->setRender(new FoundationTopBar())->purge())->with('rightmenu', $rightmenu->setRender(new FoundationTopBar())->purge());
 }
Exemplo n.º 4
0
 public function compose($view)
 {
     \Assets::add('master');
     // Build sections that will be available in all views that use master layout.
     if (auth()->check()) {
         $sections[auth()->user()->getName()] = [link_to_route('admin', _('Dashboard')), link_to_route('logout', _('Logout')), link_to_route('contact', _('Contact'))];
     } else {
         $sections[_('Sections')] = [link_to_route('login', _('Login')), link_to_route('contact', _('Contact'))];
     }
     // Pass sections to the view
     $view->with('sections', $sections);
 }
Exemplo n.º 5
0
{{-- Live preview of Markdown --}}

<?php 
Assets::add(['wiki.css', 'marked.js']);
?>

<fieldset>
	<legend><label>{{ _('Preview') }}</label></legend>
	<div id="preview">{!! $resource->markup !!}</div>
</fieldset>

@section('js')
@parent
<script>
$(document).ready(function() {

	var $source = $("#source"), $preview = $("#preview");
	$source.keyup(function () {
		$preview.html(marked($(this).val()));
	});

});
</script>
@stop
Exemplo n.º 6
0
<?php

Assets::add('canvas-demo.js');
?>

@section('main')
<canvas id="displayCanvas" width="1024" height="576"></canvas>
@stop
Exemplo n.º 7
0
@extends('layouts.base')

<?php 
Assets::add(['admin', 'datatables']);
$labelClass = ['debug' => 'info', 'info' => 'info', 'notice' => 'info', 'warning' => 'warning', 'error' => 'alert', 'critical' => 'alert', 'alert' => 'alert'];
?>

@section('css')
<style>

	table { width:100%; }
	table tbody:hover > tr {/*opacity: 0.8; */}
	table tbody:hover > tr:hover {
		/*opacity: 1.0; */
		background-color:#BBB !important;
	}
	pre {
		font-size:80%;
		padding:0 1em;
	}

	.row.fullWidth {
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		max-width: initial;
		margin-top:1em !important;
	}
	.side-nav .active { border-left: 2px solid #008CBA; }
	.reveal-modal {margin:0 !important}
	.no-wrap{
Exemplo n.º 8
0
 function before()
 {
     parent::before();
     Assets::add('css', 'css/langify.css');
     Assets::add('js', 'js/langify.js');
 }
Exemplo n.º 9
0
@extends('layouts.master')

<?php 
Assets::add('diff.css');
?>

@section('content')

	<h3 class="text-center">{{ $subtitle }}</h3>


		{{-- FACTS --}}
		<div class="row">
			<div class="small-6 columns">
				<ul class="pricing-table">
					<li class="title">{{ _('Before') }}</li>
					<li class="price">{{ $before->name }}</li>
					<li class="description">{{ _('Created by') }}: {{ $before->user }}</li>
					<li class="bullet-item">{{ $before->created_at }} {{ $before->created_at->diffForHumans() }}</li>
					<li class="cta-button"><a class="button" href="TODO">{{ _('Restore') }}</a></li>
				</ul>
			</div>

			<div class="small-6 columns">
				<ul class="pricing-table">
					<li class="title">{{ _('After') }}</li>
					<li class="price">{{ $after->name }}</li>
					<li class="description">{{ _('Created by') }}: {{ $after->user }}</li>
					<li class="bullet-item">{{ $after->created_at }} {{ $after->created_at->diffForHumans() }}</li>
					<li class="cta-button"><a class="button" href="TODO">{{ _('Restore') }}</a></li>
				</ul>
Exemplo n.º 10
0
 /**
  * Minify assets (css & js) files
  */
 public function assetsAction()
 {
     // Set the assets service
     $assets = new Assets();
     $assets->setOptions(['source' => __ROOT__ . '/public/', 'target' => 'min/', 'minify' => Assets::ALWAYS]);
     foreach (['css', 'js'] as $type) {
         $path = __ROOT__ . '/public/' . $type . '/';
         foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
             if (!$item->isDir() && $item->getExtension() == $type) {
                 echo $type . '/' . $iterator->getSubPathName() . "\n";
                 $assets->add($type . '/' . $iterator->getSubPathName());
             }
         }
     }
 }
Exemplo n.º 11
0
@extends('layouts.base')

<?php 
Assets::add('admin');
?>

@section('body')

	<div class="fixed contain-to-grid">@include('admin/top-bar')</div>

	<div class="row">
		<h1>{!! $title !!}</h1>
		{!! $body !!}
	</div>

@stop
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(FileEloquentRepository $file_repo, FolderEloquentRepository $folder_repo)
 {
     \Assets::add('vendor/filemanager/js/index.js');
     return view('filemanager::index');
 }
Exemplo n.º 13
0
<?php

Assets::add('wiki.css');
?>

{!! $resource->markup !!}

<p class="text-center">{!! link_to_route('page.version.index', _('View page versions'), [$resource->getKey()], ['class' => 'info tiny button']) !!}</p>

Exemplo n.º 14
0
@extends('layouts.base')

<?php 
Assets::add('master');
?>

@section('body')
<div class="row">
	<div class="large-7 columns large-centered">

		<h2 class="text-center">{{ config('site.name') }}</h2>

		<div class="panel radius">
			<div class="row collapse">
				<div class="small-10 columns">
					<h5>{{ _('Error') }} <span class="color">{{ $code }}</span></h5>
					<h4>{{ $title }}</h4>
				</div>
				<div id="sad" class="small-2 columns text-center"><h1 class="color">:(</h1></div>
			</div>

			<hr/>

			@section('problem-description')
			<p>
			{{ _("Something went wrong while we were processing your request") }}.
			{{ _("We're really sorry about this, and will work hard to get this resolved as soon as possible") }}.
			</p>
			@show

			<p>{!! sprintf(_('Perhaps you would like to go to our %shome page%s?'), '<a href="/">', '</a>') !!}</p>
Exemplo n.º 15
0
<?php

Assets::add(['markdown.js']);
?>

{!!
	Form::label($f = 'profiles', _('Profiles')),
	checkboxes($f, App\Profile::dropdown(), $resource->profiles->pluck('id')->all())
!!}
@if($errors->has($f))<small class="error">{{ $errors->first($f) }}</small>@endif

{!!
	Form::label($f = 'title', $labels->$f),
	Form::text($f),

	Form::label($f = 'body', $labels->$f),
	Form::textarea($f)
!!}


{{-- Live preview of Markdown --}}
<fieldset id="preview">
	<legend>{{ _('Preview') }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="full">{{ _('Toggle full screen') }}</a></legend>
	<h1 id="previewTitle">{!! $resource->title !!}</h1>
	<div id="previewBody">{!! markdown($resource->body) !!}</div>
</fieldset>

@section('js')
@parent
<script>
$(document).ready(function() {
Exemplo n.º 16
0
 /**
  * Upload asset by auto-detection
  *
  * @author Casper Rasmussen <*****@*****.**>
  *
  * @param  mixed                              $file
  * @param  string|null                        $folder
  * @param  \Nodes\Assets\Upload\Settings|null $settings
  * @return string $path
  */
 function assets_add($file, $folder = null, \Nodes\Assets\Upload\Settings $settings = null)
 {
     return \Assets::add($file, $folder, $settings);
 }