Merge branch 'master' of github.com:hillelcoren/invoice-ninja

This commit is contained in:
Hillel Coren 2014-03-18 20:56:03 +02:00
commit 48130290ce
3 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,10 @@
class Utils
{
public static function basePath() {
return substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1);
}
public static function fatalError($message = false, $exception = false)
{
if (!$message)

View File

@ -164,7 +164,9 @@ HTML::macro('image_data', function($imagePath) {
HTML::macro('breadcrumbs', function() {
$str = '<ol class="breadcrumb">';
$crumbs = explode('/', $_SERVER['REQUEST_URI']);
// Get the breadcrumbs by exploding the current path.
$crumbs = explode('/', str_replace(Utils::basePath(), '', $_SERVER['REQUEST_URI']));
foreach ($crumbs as $key => $val)
{

View File

@ -29,7 +29,7 @@
{{ Former::text('name') }}
{{ Former::text('work_email')->label('Email') }}
{{ Former::text('work_phone')->label('Phone') }}
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommnded size: 120px width, 80px height') }}
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended size: 120px width, 80px height') }}
@if (file_exists($account->getLogoPath()))
<center>