#9: Updated the installer to Bootstrap 4. The "create an account" link no longer appears on the new unified login/register view when the "allow self registration" option is disabled.

This commit is contained in:
Andy Heathershaw 2017-03-24 14:43:53 +00:00
parent ca65ba8adc
commit a588ac2b31
12 changed files with 88 additions and 150 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="PublishConfigData" autoUpload="On explicit save action" serverName="Development"> <component name="PublishConfigData" serverName="Development">
<serverData> <serverData>
<paths name="Development"> <paths name="Development">
<serverdata> <serverdata>
@ -10,6 +10,5 @@
</serverdata> </serverdata>
</paths> </paths>
</serverData> </serverData>
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</component> </component>
</project> </project>

View File

@ -104,7 +104,9 @@ class ConfigHelper
'sender_address' => sprintf('hostmaster@%s', (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost')), 'sender_address' => sprintf('hostmaster@%s', (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost')),
'sender_name' => (is_null($currentAppName) ? trans('global.app_name') : $currentAppName), 'sender_name' => (is_null($currentAppName) ? trans('global.app_name') : $currentAppName),
'smtp_server' => 'localhost', 'smtp_server' => 'localhost',
'smtp_password' => '',
'smtp_port' => 25, 'smtp_port' => 25,
'smtp_username' => '',
'theme' => 'bootstrap3' 'theme' => 'bootstrap3'
); );
} }

View File

@ -35,6 +35,9 @@ class GlobalConfiguration
public function handle(Request $request, Closure $next) public function handle(Request $request, Closure $next)
{ {
// We can always add the version number
$this->addVersionNumberToView();
// If running the installer, chances are our database isn't running yet // If running the installer, chances are our database isn't running yet
if ($request->is('install/*')) if ($request->is('install/*'))
{ {
@ -44,7 +47,6 @@ class GlobalConfiguration
// When running migrations, CLI tasks or the installer, don't need to add things to the view // When running migrations, CLI tasks or the installer, don't need to add things to the view
if (php_sapi_name() != 'cli') if (php_sapi_name() != 'cli')
{ {
$this->addVersionNumberToView();
$this->addThemeInfoToView(); $this->addThemeInfoToView();
$this->addAlbumsToView(); $this->addAlbumsToView();
} }

View File

@ -1,5 +1,6 @@
@extends('install.layout') @extends('install.layout')
@section('title', trans('installer.administrator_title'))
@section('content') @section('content')
<h3>@lang('installer.administrator_title')</h3> <h3>@lang('installer.administrator_title')</h3>
<p>@lang('installer.administrator_intro')</p> <p>@lang('installer.administrator_intro')</p>
@ -15,7 +16,7 @@
@endif @endif
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 offset-md-3">
<form action="{{ route('install.administrator') }}" method="post"> <form action="{{ route('install.administrator') }}" method="post">
{{ csrf_field() }} {{ csrf_field() }}
<div class="form-group"> <div class="form-group">
@ -42,7 +43,7 @@
@if ($can_skip) @if ($can_skip)
<a class="btn btn-default" href="{{ route('install.administrator', ['skip' => 1]) }}">Skip</a> <a class="btn btn-default" href="{{ route('install.administrator', ['skip' => 1]) }}">Skip</a>
@endif @endif
<button type="submit" class="btn btn-success">Create account</button> <button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.continue_action')</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,11 +1,12 @@
@extends('install.layout') @extends('install.layout')
@section('title', trans('installer.requirements_title'))
@section('content') @section('content')
<h3>@lang('installer.requirements_title')</h3> <h3>@lang('installer.requirements_title')</h3>
<p>@lang('installer.requirements_intro')</p> <p>@lang('installer.requirements_intro')</p>
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<div class="col-md-8 col-md-offset-2"> <div class="col-md-8 offset-md-2">
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
<tr> <tr>
@ -73,7 +74,7 @@
<div class="text-right"> <div class="text-right">
<form action="{{ route('install.check') }}" method="post"> <form action="{{ route('install.check') }}" method="post">
{{ csrf_field() }} {{ csrf_field() }}
<button type="submit" class="btn btn-success"@if (!$can_continue) disabled="disabled"@endif>@lang('forms.continue_action')</button> <button type="submit" class="btn btn-success"@if (!$can_continue) disabled="disabled"@endif><i class="fa fa-fw fa-check"></i> @lang('forms.continue_action')</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,11 +1,12 @@
@extends('install.layout') @extends('install.layout')
@section('title', trans('installer.database_title'))
@section('content') @section('content')
<h3>@lang('installer.database_title')</h3> <h3>@lang('installer.database_title')</h3>
<p>@lang('installer.database_intro')</p> <p>@lang('installer.database_intro')</p>
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 offset-md-3">
@if (!is_null($database_error)) @if (!is_null($database_error))
<div class="alert alert-danger"> <div class="alert alert-danger">
<p><strong>Database error:</strong> {{ $database_error }}</p> <p><strong>Database error:</strong> {{ $database_error }}</p>

View File

@ -6,24 +6,37 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="{{ config('app.name') }} v{{ config('app.version') }} (framework v{{ App::VERSION() }})"> <meta name="generator" content="{{ config('app.name') }} v{{ config('app.version') }} (framework v{{ App::VERSION() }})">
<title>@lang('installer.app_name')</title> <title>@yield('title') | @lang('global.app_name')</title>
<base href="{{ route('home', [], false) }}"> <base href="{{ url('/') }}">
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}} {{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
{{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}} {{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}}
<link href="themes/base/bootstrap/css/bootstrap.min.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet"> @if (App::environment() == 'production')
<link href="themes/base/font-awesome/css/font-awesome.min.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet"> <link href="css/blue-twilight.min.css?v={{ $app_version_url }}" rel="stylesheet" />
<link href="themes/base/css/app.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet"> @else
<link href="themes/bootstrap3/theme.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet"> <link href="css/blue-twilight.css?v={{ $app_version_url }}" rel="stylesheet" />
@endif
@stack('styles') @stack('styles')
</head> </head>
<body> <body>
@include('install.navbar') @include('install.navbar')
<div class="container-fluid"> {{-- Render breadcrumb within a container if present in the sub-view --}}
@if (View::hasSection('breadcrumb'))
<div class="container">
<div class="row">
<div class="col">
<ol class="breadcrumb">
@yield('breadcrumb')
</ol>
</div>
</div>
</div>
@endif
@if (isset($error)) @if (isset($error))
<div class="container"> <div class="container">
<div class="alert alert-danger"> <div class="alert alert-danger">
@ -60,16 +73,15 @@
@yield('content') @yield('content')
</div> </div>
@include('themes.base.partials.copyright_gallery') @include('themes.base.partials.copyright_admin')
</div>
{{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}} {{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}}
{{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}} {{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}}
<script src="themes/base/js/jquery.min.js?v={{ urlencode(config('app.version')) }}"></script> @if (App::environment() == 'production')
<script src="themes/base/bootstrap/js/bootstrap.min.js?v={{ urlencode(config('app.version')) }}"></script> <script type="text/javascript" src="js/blue-twilight.min.js?v={{ $app_version_url }}"></script>
<script src="themes/base/js/bootbox.min.js?v={{ urlencode(config('app.version')) }}"></script> @else
<script src="themes/base/js/knockout.min.js?v={{ urlencode(config('app.version')) }}"></script> <script type="text/javascript" src="js/blue-twilight.js?v={{ $app_version_url }}"></script>
<script src="themes/base/js/app.js?v={{ urlencode(config('app.version')) }}"></script> @endif
<script type="text/javascript"> <script type="text/javascript">
$.ajaxSetup({ $.ajaxSetup({
headers: { headers: {

View File

@ -1,20 +1,11 @@
<nav class="navbar navbar-inverse navbar-static-top"> <nav class="navbar navbar-toggleable-md navbar-inverse bg-primary">
<div class="container"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
<!-- Brand and toggle get grouped for better mobile display --> <span class="navbar-toggler-icon"></span>
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="{{ route('install.check') }}"><i class="fa fa-fw fa-photo"></i> @lang('installer.app_name')</a> <a class="navbar-brand" href="{{ route('install.check') }}"><i class="fa fa-fw fa-photo"></i> @lang('installer.app_name')</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="navbar-content">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="navbar-nav mr-auto">
<ul class="nav navbar-nav">
</ul> </ul>
</div><!-- /.navbar-collapse --> </div>
</div><!-- /.container-fluid -->
</nav> </nav>

View File

@ -11,9 +11,11 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{{ $active_tab == 'login' ? ' active' : '' }}" href="{{ url('/login') }}">@lang('auth.login_page_title')</a> <a class="nav-link{{ $active_tab == 'login' ? ' active' : '' }}" href="{{ url('/login') }}">@lang('auth.login_page_title')</a>
</li> </li>
@if (UserConfig::get('allow_self_registration'))
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{{ $active_tab == 'register' ? ' active' : '' }}" href="{{ url('/register') }}">@lang('auth.register_page_title')</a> <a class="nav-link{{ $active_tab == 'register' ? ' active' : '' }}" href="{{ url('/register') }}">@lang('auth.register_page_title')</a>
</li> </li>
@endif
</ul> </ul>
</div> </div>
<div class="card-block"> <div class="card-block">

View File

@ -22,7 +22,7 @@
@stack('styles') @stack('styles')
</head> </head>
<body> <body>
@include('themes.base.partials.navbar') @include(Theme::viewName('partials.navbar'))
{{-- Render breadcrumb within a container if present in the sub-view --}} {{-- Render breadcrumb within a container if present in the sub-view --}}
@if (View::hasSection('breadcrumb')) @if (View::hasSection('breadcrumb'))

View File

@ -1,5 +1,5 @@
<nav class="navbar navbar-toggleable-md navbar-inverse bg-primary"> <nav class="navbar navbar-toggleable-md navbar-inverse bg-primary">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<a class="navbar-brand" href="{{ route('home') }}"><i class="fa fa-fw fa-photo"></i> {{ UserConfig::get('app_name') }}</a> <a class="navbar-brand" href="{{ route('home') }}"><i class="fa fa-fw fa-photo"></i> {{ UserConfig::get('app_name') }}</a>

View File

@ -1,73 +0,0 @@
{
"base": "resources/assets/semantic-ui",
"paths": {
"source": {
"config": "src/theme.config",
"definitions": "src/definitions/",
"site": "src/site/",
"themes": "src/themes/"
},
"output": {
"packaged": "../../../public/semantic-ui/",
"uncompressed": "../../../public/semantic-ui/components/",
"compressed": "../../../public/semantic-ui/components/",
"themes": "../../../public/semantic-ui/themes/"
},
"clean": "../../../public/semantic-ui/"
},
"permission": false,
"autoInstall": false,
"rtl": false,
"components": [
"reset",
"site",
"button",
"container",
"divider",
"flag",
"header",
"icon",
"image",
"input",
"label",
"list",
"loader",
"rail",
"reveal",
"segment",
"step",
"breadcrumb",
"form",
"grid",
"menu",
"message",
"table",
"ad",
"card",
"comment",
"feed",
"item",
"statistic",
"accordion",
"checkbox",
"dimmer",
"dropdown",
"embed",
"modal",
"nag",
"popup",
"progress",
"rating",
"search",
"shape",
"sidebar",
"sticky",
"tab",
"transition",
"api",
"form",
"state",
"visibility"
],
"version": "2.2.9"
}