Number of small changes, including the rename of the Bootstrap 3 theme to Default
This commit is contained in:
parent
336e94e8e3
commit
b5769ec192
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" serverName="Development">
|
||||
<component name="PublishConfigData" autoUpload="On explicit save action" serverName="Development">
|
||||
<serverData>
|
||||
<paths name="Development">
|
||||
<serverdata>
|
||||
@ -10,5 +10,6 @@
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
|
||||
</component>
|
||||
</project>
|
@ -3,7 +3,7 @@
|
||||
<component name="WebServers">
|
||||
<option name="servers">
|
||||
<webServer id="b14a34b0-0127-4886-964a-7be75a2281ac" name="Development" url="http://blue-twilight-dev.andys.eu">
|
||||
<fileTransfer host="scar.andys.eu" port="22" privateKey="C:\Users\andy.heathershaw\Documents\SSH Key\AndyHeathershaw-OpenSSH" rootFolder="/srv/www/blue-twilight-dev" accessType="SFTP" keyPair="true">
|
||||
<fileTransfer host="scar.andys.eu" port="22" privateKey="$USER_HOME$/.ssh/id_rsa" rootFolder="/srv/www/blue-twilight-dev" accessType="SFTP" keyPair="true">
|
||||
<advancedOptions>
|
||||
<advancedOptions dataProtectionLevel="Private" />
|
||||
</advancedOptions>
|
||||
|
@ -20,7 +20,7 @@ class Album extends Model
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'description', 'url_alias', 'is_private', 'user_id', 'storage_id', 'default_view', 'parent_album_id', 'url_path'
|
||||
'name', 'description', 'url_alias', 'user_id', 'storage_id', 'default_view', 'parent_album_id', 'url_path'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -108,7 +108,7 @@ class ConfigHelper
|
||||
'smtp_password' => '',
|
||||
'smtp_port' => 25,
|
||||
'smtp_username' => '',
|
||||
'theme' => 'bootstrap3'
|
||||
'theme' => 'default'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -401,12 +401,26 @@ class AlbumController extends Controller
|
||||
}
|
||||
|
||||
$album->default_view = UserConfig::get('default_album_view');
|
||||
$album->is_private = (strtolower($request->get('is_private')) == 'on');
|
||||
$album->user_id = Auth::user()->id;
|
||||
|
||||
$album->generateAlias();
|
||||
$album->save();
|
||||
|
||||
// Link all default permissions to anonymous users (if a public album)
|
||||
$isPrivate = (strtolower($request->get('is_private')) == 'on');
|
||||
|
||||
if (!$isPrivate)
|
||||
{
|
||||
/** @var Permission $permission */
|
||||
foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission)
|
||||
{
|
||||
$album->anonymousPermissions()->attach($permission->id, [
|
||||
'created_at' => new \DateTime(),
|
||||
'updated_at' => new \DateTime()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return redirect(route('albums.show', ['id' => $album->id]));
|
||||
}
|
||||
|
||||
@ -423,7 +437,6 @@ class AlbumController extends Controller
|
||||
|
||||
$album = $this->loadAlbum($id);
|
||||
$album->fill($request->only(['name', 'description', 'parent_album_id']));
|
||||
$album->is_private = (strtolower($request->get('is_private')) == 'on');
|
||||
|
||||
if (strlen($album->parent_album_id) == 0)
|
||||
{
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RemoveAlbumIsPrivate extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('albums', function (Blueprint $table)
|
||||
{
|
||||
$table->dropColumn('is_private');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('albums', function (Blueprint $table)
|
||||
{
|
||||
$table->boolean('is_private')->default(false);
|
||||
});
|
||||
}
|
||||
}
|
@ -88,7 +88,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'edit',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 10
|
||||
]);
|
||||
|
||||
@ -96,7 +96,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'delete',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 20
|
||||
]);
|
||||
|
||||
@ -104,7 +104,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'upload-photos',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 30
|
||||
]);
|
||||
|
||||
@ -112,7 +112,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'manipulate-photos',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 40
|
||||
]);
|
||||
|
||||
@ -120,7 +120,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'change-photo-metadata',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 50
|
||||
]);
|
||||
|
||||
@ -128,7 +128,7 @@ class PermissionsSeeder extends Seeder
|
||||
DatabaseSeeder::createOrUpdate('permissions', [
|
||||
'section' => 'album',
|
||||
'description' => 'delete-photos',
|
||||
'is_default' => true,
|
||||
'is_default' => false,
|
||||
'sort_order' => 60
|
||||
]);
|
||||
}
|
||||
|
20
public/themes/bootstrap3-light/theme.css
vendored
20
public/themes/bootstrap3-light/theme.css
vendored
@ -1,20 +0,0 @@
|
||||
@import url('../bootstrap3/theme.css');
|
||||
|
||||
.navbar-default {
|
||||
background-color: #b3e6ff !important;
|
||||
border-color: #66ccff !important;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover {
|
||||
background-color: #66ccff;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-brand,
|
||||
.navbar-default .navbar-nav > li > a {
|
||||
color: #002966 !important;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-brand:hover,
|
||||
.navbar-default .navbar-nav > li > a:hover {
|
||||
color: #00c !important;
|
||||
}
|
111
public/themes/bootstrap3/theme.css
vendored
111
public/themes/bootstrap3/theme.css
vendored
@ -1,111 +0,0 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
|
||||
|
||||
* {
|
||||
font-family: Raleway, sans-serif;
|
||||
}
|
||||
|
||||
.album-container .photo {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.content-body {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
div.breadcrumb {
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
ol.breadcrumb {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.navbar .avatar {
|
||||
border-radius: 20px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-color: #000044 !important;
|
||||
border-color: #000088 !important;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:focus, .navbar-inverse .navbar-nav > .open > a:hover {
|
||||
background-color: #000088;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
color: #b3d1ff !important;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand:hover,
|
||||
.navbar-inverse .navbar-nav > li > a:hover {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.panel .progress {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.photo {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.photo .loading {
|
||||
background-color: #ffffff;
|
||||
display: none;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
opacity: 0.8;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.photo .loading img {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.photo-metadata .metadata_name
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#system-info {
|
||||
table-layout: fixed;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#system-info .meta-label
|
||||
{
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
#system-info .meta-value
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
border: solid 1px #ddd;
|
||||
border-top: 0;
|
||||
padding: 20px;
|
||||
}
|
29
public/themes/default/theme.css
vendored
Normal file
29
public/themes/default/theme.css
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
|
||||
|
||||
* {
|
||||
font-family: "Raleway", sans-serif;
|
||||
}
|
||||
|
||||
a,
|
||||
a.btn-link {
|
||||
color: #014c8c;
|
||||
}
|
||||
|
||||
a:focus, a:hover {
|
||||
color: #0275d8;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #000044 !important;
|
||||
border-color: #000088 !important;
|
||||
}
|
||||
|
||||
.navbar .navbar-brand,
|
||||
.navbar .navbar-nav > li > a {
|
||||
color: #b3d1ff !important;
|
||||
}
|
||||
|
||||
.navbar .navbar-brand:hover,
|
||||
.navbar .navbar-nav > li > a:hover {
|
||||
color: #fff !important;
|
||||
}
|
@ -17,31 +17,36 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="{{ $hasChildren ? 'col-md-8' : 'col-md-10 offset-md-1' }} text-center">
|
||||
<div class="col text-center">
|
||||
<h1>@lang('gallery.album_no_results_heading')</h1>
|
||||
<p style="line-height: 1.6em;">@lang('gallery.album_no_results_text', ['admin_link' => sprintf('<a href="%s">%s</a>', route('admin'), trans('admin.title'))])</p>
|
||||
<p style="margin-bottom: 30px; line-height: 1.6em;">@lang('gallery.album_no_results_text_2')</p>
|
||||
|
||||
<img src="{{ asset('themes/base/images/smartphone-photo.jpg') }}" class="img-fluid rounded" style="display: inline;" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($hasChildren)
|
||||
<div class="col-md-2 offset-md-1">
|
||||
<h2 style="margin-top: 60px;"><small class="text-muted">@lang('gallery.other_albums_heading', ['album_name' => $album->name])</small></h2>
|
||||
<p class="mb-4">@lang('gallery.other_albums_description')</p>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($album->children as $childAlbum)
|
||||
<div class="col-sm-4 col-md-3" style="max-width: 250px;">
|
||||
<div class="card mb-3">
|
||||
<img class="card-img-top" src="{{ $childAlbum->thumbnailUrl('preview') }}" style="height: 150px;"/>
|
||||
<img class="card-img-top" src="{{ $childAlbum->thumbnailUrl('preview') }}" style="max-height: 120px;"/>
|
||||
<div class="card-block">
|
||||
<h4 class="card-title"><a href="{{ $childAlbum->url() }}">{{ $childAlbum->name }}</a></h4>
|
||||
<h5 class="card-title"><a href="{{ $childAlbum->url() }}">{{ $childAlbum->name }}</a></h5>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small class="text-muted"><i class="fa fa-fw fa-photo"></i> {{ $childAlbum->photos_count }} photos</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -7,7 +7,7 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container album-container album-slideshow-container">
|
||||
<div class="container album-container album-slideshow-container" id="slideshow-container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="pull-right">
|
||||
@ -21,18 +21,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="slideshow-container">
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<div class="pull-right">
|
||||
<div class="btn btn-group">
|
||||
<button class="btn btn-default" v-on:click="pauseSlideshow" v-bind:disabled="isPaused" v-if="isRunning"><i class="fa fa-fw fa-pause"></i></button>
|
||||
<button class="btn btn-default" v-on:click="continueSlideshow" v-bind:disabled="!isPaused" v-if="isRunning"><i class="fa fa-fw fa-play"></i></button>
|
||||
<button class="btn btn-secondary" v-on:click="pauseSlideshow" v-bind:disabled="isPaused" v-if="isRunning"><i class="fa fa-fw fa-pause"></i></button>
|
||||
<button class="btn btn-secondary" v-on:click="continueSlideshow" v-bind:disabled="!isPaused" v-if="isRunning"><i class="fa fa-fw fa-play"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="image-preview" v-if="current !== null">
|
||||
<a v-bind:href="current.info_url" v-bind:title="current.description">
|
||||
<img class="img-rounded thumbnail img-responsive" v-bind:src="current.original_url" v-bind:alt="current.name" v-bind:title="current.description"/>
|
||||
<img class="rounded thumbnail" v-bind:src="current.original_url" v-bind:alt="current.name" v-bind:title="current.description"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,8 +42,8 @@
|
||||
<div class="col">
|
||||
<div class="thumbnails">
|
||||
@foreach ($photos as $photo)
|
||||
<a href="{{ $photo->url() }}" v-on:click="changeCurrentImage({{ $photo->id }});">
|
||||
<img class="ss-thumbnail" src="{{ $photo->thumbnailUrl('slideshow-tiny') }}" alt="{{ $photo->name }}" title="{{ $photo->description }}" data-photo-id="{{ $photo->id }}" data-original-url="{{ $photo->thumbnailUrl('fullsize') }}" data-info-url="{{ $photo->url() }}" />
|
||||
<a href="{{ $photo->url() }}" v-on:click="changeCurrentImage({{ $photo->id }}); $event.preventDefault();">
|
||||
<img class="ss-thumbnail rounded" src="{{ $photo->thumbnailUrl('slideshow-tiny') }}" alt="{{ $photo->name }}" title="{{ $photo->description }}" data-photo-id="{{ $photo->id }}" data-original-url="{{ $photo->thumbnailUrl('fullsize') }}" data-info-url="{{ $photo->url() }}" />
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
@ -19,6 +19,10 @@
|
||||
<link href="css/blue-twilight.css?v={{ $app_version_url }}" rel="stylesheet" />
|
||||
@endif
|
||||
|
||||
@if (Theme::hasStylesheet())
|
||||
<link href="{{ $theme_url }}/theme.css?v={{ $app_version_url }}" rel="stylesheet">
|
||||
@endif
|
||||
|
||||
@stack('styles')
|
||||
</head>
|
||||
<body>
|
||||
|
@ -1 +0,0 @@
|
||||
This theme behaves exactly the same as "bootstrap3" - however the Bootstrap navigation bar uses the default/light theme.
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "Bootstrap 3 (Light)",
|
||||
"version": "1.0",
|
||||
"author": "Andy Heathershaw",
|
||||
"author_email": "andy@andys.eu",
|
||||
"navbar_class": "navbar-default navbar-static-top",
|
||||
"thumbnails": [
|
||||
{
|
||||
"name": "fullsize",
|
||||
"height": 600,
|
||||
"width": 800
|
||||
},
|
||||
{
|
||||
"name": "preview",
|
||||
"height": 300,
|
||||
"width": 400
|
||||
},
|
||||
{
|
||||
"name": "admin-preview",
|
||||
"height": 112,
|
||||
"width": 150
|
||||
},
|
||||
{
|
||||
"name": "slideshow-tiny",
|
||||
"height": 75,
|
||||
"width": 100
|
||||
}
|
||||
]
|
||||
}
|
@ -1,9 +1,8 @@
|
||||
{
|
||||
"name": "Bootstrap 3",
|
||||
"name": "Default",
|
||||
"version": "1.0",
|
||||
"author": "Andy Heathershaw",
|
||||
"author_email": "andy@andys.eu",
|
||||
"navbar_class": "navbar-inverse navbar-static-top",
|
||||
"thumbnails": [
|
||||
{
|
||||
"name": "fullsize",
|
Loading…
Reference in New Issue
Block a user