mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Removed unused skin files, added skin setting option
This commit is contained in:
parent
ef91cc992e
commit
f171357e36
|
@ -386,6 +386,7 @@ class SettingsController extends Controller
|
|||
$setting->header_color = $request->input('header_color');
|
||||
$setting->support_footer = $request->input('support_footer');
|
||||
$setting->footer_text = $request->input('footer_text');
|
||||
$setting->skin = $request->input('skin');
|
||||
$setting->show_url_in_emails = $request->input('show_url_in_emails', '0');
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddThemeToSettings extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->char('skin')->nullable()->default(null);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('skin');
|
||||
});
|
||||
}
|
||||
}
|
Binary file not shown.
BIN
public/css/skins/skin-black-light.min.css
vendored
BIN
public/css/skins/skin-black-light.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-black.min.css
vendored
BIN
public/css/skins/skin-black.min.css
vendored
Binary file not shown.
BIN
public/css/skins/skin-blue.min.css
vendored
BIN
public/css/skins/skin-blue.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-green-light.min.css
vendored
BIN
public/css/skins/skin-green-light.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-green.min.css
vendored
BIN
public/css/skins/skin-green.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-purple-light.min.css
vendored
BIN
public/css/skins/skin-purple-light.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-purple.min.css
vendored
BIN
public/css/skins/skin-purple.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-red-light.min.css
vendored
BIN
public/css/skins/skin-red-light.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-red.min.css
vendored
BIN
public/css/skins/skin-red.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-yellow-light.min.css
vendored
BIN
public/css/skins/skin-yellow-light.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/css/skins/skin-yellow.min.css
vendored
BIN
public/css/skins/skin-yellow.min.css
vendored
Binary file not shown.
|
@ -177,6 +177,7 @@
|
|||
'settings' => 'Settings',
|
||||
'sign_in' => 'Sign in',
|
||||
'signature' => 'Signature',
|
||||
'skin' => 'Skin',
|
||||
'some_features_disabled' => 'DEMO MODE: Some features are disabled for this installation.',
|
||||
'site_name' => 'Site Name',
|
||||
'state' => 'State',
|
||||
|
|
|
@ -511,3 +511,22 @@ Form::macro('customfield_elements', function ($name = "customfield_elements", $s
|
|||
return $select;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Form::macro('skin', function ($name = "skin", $selected = null, $class = null) {
|
||||
|
||||
$formats = array(
|
||||
'' => 'Default Blue',
|
||||
'skin-green-dark.css' => 'Green Dark',
|
||||
);
|
||||
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="width: 250px">';
|
||||
foreach ($formats as $format => $label) {
|
||||
$select .= '<option value="'.$format.'"'.($selected == $format ? ' selected="selected"' : '').'>'.$label.'</option> '."\n";
|
||||
}
|
||||
|
||||
$select .= '</select>';
|
||||
return $select;
|
||||
|
||||
});
|
||||
|
|
|
@ -31,9 +31,13 @@
|
|||
|
||||
</script>
|
||||
|
||||
|
||||
@if (($snipeSettings) && ($snipeSettings->skin!=''))
|
||||
<link rel="stylesheet" href="{{ url('css/skins/'.$snipeSettings->skin) }}">
|
||||
@endif
|
||||
|
||||
<style nonce="{{ csrf_token() }}">
|
||||
@if ($snipeSettings)
|
||||
@if ($snipeSettings->header_color)
|
||||
@if (($snipeSettings) && ($snipeSettings->header_color!=''))
|
||||
.main-header .navbar, .main-header .logo {
|
||||
background-color: {{ $snipeSettings->header_color }};
|
||||
background: -webkit-linear-gradient(top, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
|
||||
|
@ -48,13 +52,12 @@
|
|||
background-color: {{ $snipeSettings->header_color }};
|
||||
border-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->custom_css)
|
||||
@if (($snipeSettings) && ($snipeSettings->custom_css!=''))
|
||||
{!! $snipeSettings->show_custom_css() !!}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.navbar-left {
|
||||
margin: 2px;
|
||||
|
|
|
@ -120,6 +120,18 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email format -->
|
||||
<div class="form-group {{ $errors->has('skin') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('skin', trans('general.skin')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::skin('skin', Input::old('skin', $setting->skin), 'select2') !!}
|
||||
{!! $errors->first('skin', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Custom css -->
|
||||
<div class="form-group {{ $errors->has('custom_css') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
|
|
Loading…
Reference in a new issue