Code for the demo features.

This commit is contained in:
James Cole 2016-12-26 09:18:45 +01:00
parent c86aa9cb3f
commit 2847e2aff5
3 changed files with 20 additions and 1 deletions

View File

@ -45,3 +45,6 @@ SITE_OWNER=mail@example.com
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=
DEMO_USERNAME=
DEMO_PASSWORD=

View File

@ -23,6 +23,7 @@ use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Session;
use View;
use FireflyConfig;
/**
* Class Controller
@ -49,7 +50,10 @@ class Controller extends BaseController
View::share('hideCategories', false);
View::share('hideBills', false);
View::share('hideTags', false);
$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
View::share('IS_DEMO_SITE', $isDemoSite);
View::share('DEMO_USERNAME', env('DEMO_USERNAME',''));
View::share('DEMO_PASSWORD', env('DEMO_PASSWORD',''));
// translations:

View File

@ -2,6 +2,18 @@
{% block content %}
{% if IS_DEMO_SITE %}
<div class="row">
<div class="col-lg-12">
<p class="well">
Welcome to the Firefly III demonstration website!<br />
<br />
To log in, please use email address <strong>{{ DEMO_USERNAME }}</strong> with password <strong>{{ DEMO_PASSWORD }}</strong>
</p>
</div>
</div>
{% endif %}
{% if errors.has('email') %}
<div class="row">
<div class="col-lg-12">