#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

3
.idea/deployment.xml generated
View File

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

View File

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

View File

@ -35,6 +35,9 @@ class GlobalConfiguration
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 ($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
if (php_sapi_name() != 'cli')
{
$this->addVersionNumberToView();
$this->addThemeInfoToView();
$this->addAlbumsToView();
}

View File

@ -1,5 +1,6 @@
@extends('install.layout')
@section('title', trans('installer.administrator_title'))
@section('content')
<h3>@lang('installer.administrator_title')</h3>
<p>@lang('installer.administrator_intro')</p>
@ -15,7 +16,7 @@
@endif
<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">
{{ csrf_field() }}
<div class="form-group">
@ -42,7 +43,7 @@
@if ($can_skip)
<a class="btn btn-default" href="{{ route('install.administrator', ['skip' => 1]) }}">Skip</a>
@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>
</form>
</div>

View File

@ -1,11 +1,12 @@
@extends('install.layout')
@section('title', trans('installer.requirements_title'))
@section('content')
<h3>@lang('installer.requirements_title')</h3>
<p>@lang('installer.requirements_intro')</p>
<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">
<tbody>
<tr>
@ -73,7 +74,7 @@
<div class="text-right">
<form action="{{ route('install.check') }}" method="post">
{{ 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>
</div>
</div>

View File

@ -1,11 +1,12 @@
@extends('install.layout')
@section('title', trans('installer.database_title'))
@section('content')
<h3>@lang('installer.database_title')</h3>
<p>@lang('installer.database_intro')</p>
<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))
<div class="alert alert-danger">
<p><strong>Database error:</strong> {{ $database_error }}</p>

View File

@ -6,70 +6,82 @@
<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() }})">
<title>@lang('installer.app_name')</title>
<base href="{{ route('home', [], false) }}">
<title>@yield('title') | @lang('global.app_name')</title>
<base href="{{ url('/') }}">
<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! --}}
{{-- 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">
<link href="themes/base/font-awesome/css/font-awesome.min.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
<link href="themes/base/css/app.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
<link href="themes/bootstrap3/theme.css?v={{ urlencode(config('app.version')) }}" rel="stylesheet">
@if (App::environment() == 'production')
<link href="css/blue-twilight.min.css?v={{ $app_version_url }}" rel="stylesheet" />
@else
<link href="css/blue-twilight.css?v={{ $app_version_url }}" rel="stylesheet" />
@endif
@stack('styles')
</head>
<body>
@include('install.navbar')
<div class="container-fluid">
@if (isset($error))
<div class="container">
<div class="alert alert-danger">
<strong><i class="fa fa-exclamation-circle fa-fw"></i></strong> {{ $error }}
</div>
</div>
@endif
@if (isset($warning))
<div class="container">
<div class="alert alert-warning">
<strong><i class="fa fa-warning fa-fw"></i></strong> {{ $warning }}
</div>
</div>
@endif
@if (isset($success))
<div class="container">
<div class="alert alert-success">
<strong><i class="fa fa-info-circle fa-fw"></i></strong> {{ $success }}
</div>
</div>
@endif
@if (isset($info))
<div class="container">
<div class="alert alert-info">
<strong><i class="fa fa-info-circle fa-fw"></i></strong> {{ $info }}
</div>
</div>
@endif
{{-- Render breadcrumb within a container if present in the sub-view --}}
@if (View::hasSection('breadcrumb'))
<div class="container">
@yield('content')
<div class="row">
<div class="col">
<ol class="breadcrumb">
@yield('breadcrumb')
</ol>
</div>
</div>
</div>
@endif
@include('themes.base.partials.copyright_gallery')
@if (isset($error))
<div class="container">
<div class="alert alert-danger">
<strong><i class="fa fa-exclamation-circle fa-fw"></i></strong> {{ $error }}
</div>
</div>
@endif
@if (isset($warning))
<div class="container">
<div class="alert alert-warning">
<strong><i class="fa fa-warning fa-fw"></i></strong> {{ $warning }}
</div>
</div>
@endif
@if (isset($success))
<div class="container">
<div class="alert alert-success">
<strong><i class="fa fa-info-circle fa-fw"></i></strong> {{ $success }}
</div>
</div>
@endif
@if (isset($info))
<div class="container">
<div class="alert alert-info">
<strong><i class="fa fa-info-circle fa-fw"></i></strong> {{ $info }}
</div>
</div>
@endif
<div class="container">
@yield('content')
</div>
@include('themes.base.partials.copyright_admin')
{{-- 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 --}}
<script src="themes/base/js/jquery.min.js?v={{ urlencode(config('app.version')) }}"></script>
<script src="themes/base/bootstrap/js/bootstrap.min.js?v={{ urlencode(config('app.version')) }}"></script>
<script src="themes/base/js/bootbox.min.js?v={{ urlencode(config('app.version')) }}"></script>
<script src="themes/base/js/knockout.min.js?v={{ urlencode(config('app.version')) }}"></script>
<script src="themes/base/js/app.js?v={{ urlencode(config('app.version')) }}"></script>
@if (App::environment() == 'production')
<script type="text/javascript" src="js/blue-twilight.min.js?v={{ $app_version_url }}"></script>
@else
<script type="text/javascript" src="js/blue-twilight.js?v={{ $app_version_url }}"></script>
@endif
<script type="text/javascript">
$.ajaxSetup({
headers: {

View File

@ -1,20 +1,11 @@
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<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>
<a class="navbar-brand" href="{{ route('install.check') }}"><i class="fa fa-fw fa-photo"></i> @lang('installer.app_name')</a>
</div>
<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="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="{{ route('install.check') }}"><i class="fa fa-fw fa-photo"></i> @lang('installer.app_name')</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
<div class="collapse navbar-collapse" id="navbar-content">
<ul class="navbar-nav mr-auto">
</ul>
</div>
</nav>

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<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>
</button>
<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"
}