-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
castamir
committed
Jan 17, 2014
1 parent
1e0652a
commit b09777a
Showing
97 changed files
with
1,777 additions
and
3,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,2 @@ | ||
sandbox for nette 2.1 (dev) | ||
======= | ||
Original nette/sandbox: https://github.com/nette/sandbox | ||
|
||
Main differences | ||
---- | ||
- Admin & Front modules by default (including routes) | ||
- custom ErrorPresenter for each module (including nested modules) - here should be name of a nice guy, who send me this addon, but i have fotgot his name =( | ||
- composer and robotloader are now more synced | ||
- changed composer vendor dir to libs/composer | ||
- netterobots.txt disallows libs/composer | ||
- app dir reorganized | ||
- app/modules for custom app modules | ||
- app/services contains all services defined in config.neon | ||
- custom dependencies | ||
- LeanMapper | ||
- DatePicker | ||
|
||
Install | ||
---- | ||
via Composer | ||
|
||
composer create-project castamir/sandbox sandbox | ||
|
||
Licence | ||
---- | ||
MIT | ||
netiso | ||
====== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
/** | ||
* Nette Framework Extras | ||
* | ||
* This source file is subject to the New BSD License. | ||
* | ||
* For more information please see http://extras.nettephp.com | ||
* | ||
* @copyright Copyright (c) 2009 David Grudl | ||
* @license New BSD License | ||
* @link http://extras.nettephp.com | ||
* @package Nette Extras | ||
* @version $Id: VisualPaginator.php 4 2009-07-14 15:22:02Z [email protected] $ | ||
*/ | ||
|
||
use Nette\Application\UI\Control; | ||
use Nette\Utils\Paginator; | ||
|
||
/** | ||
* Visual paginator control. | ||
* | ||
* @author David Grudl | ||
* @copyright Copyright (c) 2009 David Grudl | ||
* @package Nette Extras | ||
* @property Nette\Templating\IFileTemplate $template | ||
*/ | ||
class VisualPaginator extends Control | ||
{ | ||
/** @var Paginator */ | ||
private $paginator; | ||
|
||
/** @persistent */ | ||
public $page = 1; | ||
|
||
/** | ||
* @return Paginator | ||
*/ | ||
public function getPaginator() | ||
{ | ||
if (!$this->paginator) { | ||
$this->paginator = new Paginator; | ||
} | ||
return $this->paginator; | ||
} | ||
|
||
/** | ||
* Renders paginator. | ||
* @return void | ||
*/ | ||
public function render() | ||
{ | ||
$paginator = $this->getPaginator(); | ||
$page = $paginator->page; | ||
if ($paginator->pageCount < 2) { | ||
$steps = array($page); | ||
|
||
} else { | ||
$arr = range(max($paginator->firstPage, $page - 3), min($paginator->lastPage, $page + 3)); | ||
$count = 4; | ||
$quotient = ($paginator->pageCount - 1) / $count; | ||
for ($i = 0; $i <= $count; $i++) { | ||
$arr[] = round($quotient * $i) + $paginator->firstPage; | ||
} | ||
sort($arr); | ||
$steps = array_values(array_unique($arr)); | ||
} | ||
|
||
$this->template->steps = $steps; | ||
$this->template->paginator = $paginator; | ||
$this->template->setFile(dirname(__FILE__) . '/template.latte'); | ||
$this->template->render(); | ||
} | ||
|
||
/** | ||
* Loads state informations. | ||
* @param array | ||
* @return void | ||
*/ | ||
public function loadState(array $params) | ||
{ | ||
parent::loadState($params); | ||
$this->getPaginator()->page = $this->page; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
(c) 2009 David Grudl. All rights reserved. | ||
*/ | ||
|
||
.paginator { | ||
margin: 1em 0; | ||
font-size: 90%; | ||
} | ||
|
||
.paginator a, .paginator span { | ||
margin-right: 0.1em; | ||
padding: 0.2em 0.5em; | ||
color: #999999; | ||
} | ||
|
||
.paginator a { | ||
border: 1px solid #9AAFE5; | ||
text-decoration: none; | ||
color: #105CB6; | ||
} | ||
|
||
.paginator span.button { | ||
border: 1px solid #DDDDDD; | ||
} | ||
|
||
.paginator .current { | ||
background: #2E6AB1; | ||
border: 1px solid #2E6AB1; | ||
color: white; | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{* | ||
* @version $Id: template.phtml 2 2009-07-13 20:58:52Z [email protected] $ | ||
* @param Paginator $paginator | ||
* @param array $steps | ||
*} | ||
|
||
{if $paginator->pageCount > 1} | ||
<div class="paginator"> | ||
{if $paginator->isFirst()} | ||
<span class="button">« Previous</span> | ||
{else} | ||
<a href="{link this, 'page' => $paginator->page - 1}">« Previous</a> | ||
{/if} | ||
|
||
{foreach $steps as $step} | ||
{if $step == $paginator->page} | ||
<span class="current">{$step}</span> | ||
{else} | ||
<a href="{link this, 'page' => $step}">{$step}</a> | ||
{/if} | ||
{if $iterator->nextValue > $step + 1} | ||
<span>…</span> | ||
{/if} | ||
{/foreach} | ||
|
||
{if $paginator->isLast()} | ||
<span class="button">Next »</span> | ||
{else} | ||
<a href="{link this, 'page' => $paginator->page + 1}">Next »</a> | ||
{/if} | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
parameters: | ||
|
||
nette: | ||
database: | ||
dsn: 'mysql:host=localhost;dbname=test' | ||
user: | ||
password: | ||
options: | ||
lazy: yes | ||
db: | ||
host: 127.0.0.1 | ||
driver: mysql | ||
database: netiso_new | ||
user: root | ||
password: | ||
profiler: TRUE | ||
mailer: | ||
smtp: true | ||
host: smtp.gmail.com | ||
port: 465 | ||
username: [email protected] | ||
password: mirasman | ||
secure: ssl | ||
|
||
services: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
- Model\Tables\UserRepository | ||
- Model\Tables\Fakturace\ZakaznikRepository | ||
- Model\Tables\RoleRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,60 @@ | ||
# | ||
# SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! | ||
# | ||
# If you don't protect this directory from direct web access, anybody will be able to see your passwords. | ||
# http://nette.org/security-warning | ||
# | ||
parameters: | ||
libsDir: %appDir%/../libs | ||
|
||
php: | ||
date.timezone: Europe/Prague | ||
# zlib.output_compression: yes | ||
|
||
nette: | ||
application: | ||
errorPresenter: Error | ||
mapping: | ||
*: App\*Module\*Presenter | ||
|
||
mailer: | ||
smtp: %mailer.smtp% | ||
host: %mailer.host% | ||
port: %mailer.port% | ||
username: %mailer.username% | ||
password: %mailer.password% | ||
secure: %mailer.secure% | ||
|
||
session: | ||
expiration: 14 days | ||
name: netiso | ||
|
||
extensions: | ||
webloader: WebLoader\Nette\Extension | ||
|
||
services: | ||
- App\RouterFactory | ||
router: @App\RouterFactory::createRouter | ||
|
||
wlCssFilter: WebLoader\Filter\CssUrlsFilter(%wwwDir%) | ||
cssMin: Services\CssMin | ||
|
||
- Services\Security\Authenticator | ||
|
||
- LeanMapper\Connection(%db%) | ||
- Model\StandardMapper | ||
|
||
factories: | ||
|
||
webloader: | ||
css: | ||
default: | ||
files: | ||
- screen.css | ||
- tables.css | ||
filters: | ||
- @wlCssFilter | ||
- @cssMin | ||
js: | ||
default: | ||
remoteFiles: | ||
- http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js | ||
- http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js | ||
- http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/i18n/jquery-ui-i18n.min.js | ||
files: | ||
- %libsDir%/composer/nette/nette/client-side/netteForms.js | ||
- %libsDir%/composer/castamir/datepicker/client-side/datepicker-init.js | ||
- {files: ["*.js"], from: %wwwDir%/js} # Nette\Utils\Finder support |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.