Skip to content

Instantly share code, notes, and snippets.

View janmarek's full-sized avatar

Jan Marek janmarek

  • Prague, Czech Republic
View GitHub Profile
@janmarek
janmarek / SeoRouter.php
Created September 12, 2010 16:32
SEO router
<?php
/**
* Seo router
*
* @author Jan Marek
*/
class SeoRouter extends Nette\Object implements Nette\Application\IRouter
{
private $presenter;
@janmarek
janmarek / gist:572165
Created September 9, 2010 16:55
Gridito template macros
{gridito usersGrid}
{* top toolbar *}
{gridito.toolbar.button addUser text => "Nový uživatel", icon => "plusthick", plink => "add"}
{* columns *}
{gridito.column username text => "Uživatelské jméno", sortable => true}
{gridito.column name text => "Jméno", sortable => true}
{gridito.column mail text => "E-mail", sortable => true}
{gridito.column allowed text => "Aktivní", sortable => true}
{gridito.column created text => "Datum založení", sortable => true, dateTimeFormat => "j.n.Y"}
@janmarek
janmarek / BaseForm.php
Created September 3, 2010 16:51
Nette datepicker
<?php
class BaseForm extends Nette\Application\AppForm
{
public function addDatePicker($name, $label = NULL, $cols = NULL, $maxLength = NULL)
{
return $this[$name] = new Nette\Forms\DatePicker($label, $cols, $maxLength);
}
}
@janmarek
janmarek / MultipleFileUpload.php
Created April 23, 2010 15:59
HTML 5 multiple file upload
<?php
/**
* Nette Framework
*
* @copyright Copyright (c) 2004, 2010 David Grudl
* @license http://nettephp.com/license Nette license
* @link http://nettephp.com
* @category Nette
* @package Nette\Forms
@janmarek
janmarek / FormMacros.php
Created March 28, 2010 21:30
Form macros
<?php
namespace Nette\Templates;
use Nette\Forms\Form;
use Nette\String;
/**
* Form macros
*