|
|
@@ -3,44 +3,52 @@
|
|
|
<div class="box-header with-border">
|
|
|
<h3 class="box-title"></h3>
|
|
|
</div>
|
|
|
- <input type="hidden" name="section_position" id="section_position" value="{{$section_position}}">
|
|
|
- <input type="hidden" name="region_1_position" id="region_1_position" value="{{$region_1_position}}">
|
|
|
- <input type="hidden" name="region_2_position" id="region_2_position" value="{{$region_2_position}}">
|
|
|
+ <input type="hidden" name="section_position" id="section_position" value="{{ $section_position }}">
|
|
|
+ <input type="hidden" name="region_1_position" id="region_1_position" value="{{ $region_1_position }}">
|
|
|
+ <input type="hidden" name="region_2_position" id="region_2_position" value="{{ $region_2_position }}">
|
|
|
<div class="box-body">
|
|
|
<div class="row">
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('title', 'Titolo:') !!} <span id="chars">{{isset($news) ? 100 - strlen($news->title) : 100}} caratteri rimanenti</span>
|
|
|
- {!! Form::text('title', null, array('class' => 'form-control title', 'maxlength' => 100)) !!}
|
|
|
- </div>
|
|
|
+ <label for="title">Titolo:</label>
|
|
|
+ <span id="chars">{{ isset($news) ? 100 - strlen($news->title) : 100 }} caratteri rimanenti</span>
|
|
|
+ <input type="text" name="title" id="title" class="form-control title" maxlength="100" value="{{ old('title', $news->title ?? '') }}">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('title_region_1', 'Titolo regione 1:') !!} <span id="chars_region_1">{{isset($news) ? 100 - strlen($news->title_region_1) : 100}} caratteri rimanenti</span>
|
|
|
- {!! Form::text('title_region_1', null, array('class' => 'form-control title_region_1', 'maxlength' => 100)) !!}
|
|
|
- </div>
|
|
|
+ <label for="title_region_1">Titolo regione 1:</label>
|
|
|
+ <span id="chars_region_1">{{ isset($news) ? 100 - strlen($news->title_region_1) : 100 }} caratteri rimanenti</span>
|
|
|
+ <input type="text" name="title_region_1" id="title_region_1" class="form-control title_region_1" maxlength="100" value="{{ old('title_region_1', $news->title_region_1 ?? '') }}">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('title_region_2', 'Titolo regione 2:') !!} <span id="chars_region_2">{{isset($news) ? 100 - strlen($news->title_region_2) : 100}} caratteri rimanenti</span>
|
|
|
- {!! Form::text('title_region_2', null, array('class' => 'form-control title_region_2', 'maxlength' => 100)) !!}
|
|
|
- </div>
|
|
|
+ <label for="title_region_2">Titolo regione 2:</label>
|
|
|
+ <span id="chars_region_2">{{ isset($news) ? 100 - strlen($news->title_region_2) : 100 }} caratteri rimanenti</span>
|
|
|
+ <input type="text" name="title_region_2" id="title_region_2" class="form-control title_region_2" maxlength="100" value="{{ old('title_region_2', $news->title_region_2 ?? '') }}">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('homepage_position', 'Posizione primo piano:') !!}
|
|
|
- {!! Form::select('homepage_position', ['' => '', 'slide1' => 'Apertura', 'left1' => 'Slide Sinistra 1', 'left2' => 'Slide Sinistra 2', 'left3' => 'Slide Sinistra 3', 'right1' => 'Slide Destra 1', 'right2' => 'Slide Destra 2', 'right3' => 'Slide Destra 3'], null, ['class' => 'form-control']) !!}
|
|
|
- </div>
|
|
|
+ <label for="homepage_position">Posizione primo piano:</label>
|
|
|
+ <select name="homepage_position" id="homepage_position" class="form-control">
|
|
|
+ <option value=""></option>
|
|
|
+ <option value="slide1" {{ old('homepage_position', $news->homepage_position ?? '') == 'slide1' ? 'selected' : '' }}>Apertura</option>
|
|
|
+ <option value="left1" {{ old('homepage_position', $news->homepage_position ?? '') == 'left1' ? 'selected' : '' }}>Slide Sinistra 1</option>
|
|
|
+ <option value="left2" {{ old('homepage_position', $news->homepage_position ?? '') == 'left2' ? 'selected' : '' }}>Slide Sinistra 2</option>
|
|
|
+ <option value="left3" {{ old('homepage_position', $news->homepage_position ?? '') == 'left3' ? 'selected' : '' }}>Slide Sinistra 3</option>
|
|
|
+ <option value="right1" {{ old('homepage_position', $news->homepage_position ?? '') == 'right1' ? 'selected' : '' }}>Slide Destra 1</option>
|
|
|
+ <option value="right2" {{ old('homepage_position', $news->homepage_position ?? '') == 'right2' ? 'selected' : '' }}>Slide Destra 2</option>
|
|
|
+ <option value="right3" {{ old('homepage_position', $news->homepage_position ?? '') == 'right3' ? 'selected' : '' }}>Slide Destra 3</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col-md-8">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('aaa', 'News attualmente in primo piano:') !!}<br>
|
|
|
+ <label for="aaa">News attualmente in primo piano:</label><br>
|
|
|
<ul>
|
|
|
{!! @$first !!}
|
|
|
</ul>
|
|
|
@@ -48,314 +56,188 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('section_id', 'Sezione:') !!}
|
|
|
- {!! Form::select('section_id', [''=>''] + $sections, null, ['class' => 'form-control section_id_change']) !!}
|
|
|
- </div>
|
|
|
+ <label for="section_id">Sezione:</label>
|
|
|
+ <select name="section_id" id="section_id" class="form-control section_id_change">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($sections as $key => $value)
|
|
|
+ <option value="{{ $key }}" {{ old('section_id', $news->section_id ?? '') == $key ? 'selected' : '' }}>{{ $value }}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('region_1_id', 'Regione 1:') !!}
|
|
|
- {!! Form::select('region_1_id', [''=>''] + $regions, null, ['class' => 'form-control region_1_id_change']) !!}
|
|
|
- </div>
|
|
|
+ <label for="region_1_id">Regione 1:</label>
|
|
|
+ <select name="region_1_id" id="region_1_id" class="form-control region_1_id_change">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($regions as $key => $value)
|
|
|
+ <option value="{{ $key }}" {{ old('region_1_id', $news->region_1_id ?? '') == $key ? 'selected' : '' }}>{{ $value }}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('region_2_id', 'Regione 2:') !!}
|
|
|
- {!! Form::select('region_2_id', [''=>''] + $regions, null, ['class' => 'form-control region_2_id_change']) !!}
|
|
|
- </div>
|
|
|
+ <label for="region_2_id">Regione 2:</label>
|
|
|
+ <select name="region_2_id" id="region_2_id" class="form-control region_2_id_change">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($regions as $key => $value)
|
|
|
+ <option value="{{ $key }}" {{ old('region_2_id', $news->region_2_id ?? '') == $key ? 'selected' : '' }}>{{ $value }}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
-
|
|
|
@if(isset($news))
|
|
|
@if(($news->section_id > 0 && $news->section_position != '') || (!$news->online && $news->section_id > 0))
|
|
|
- <div class="col-md-4" id="layout_section" style="display:{{(isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_section" style="display:{{ (isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@else
|
|
|
<div class="col-md-4">
|
|
|
- {!! isset($news->section) ? $news->section->position($news->id) : ''!!}
|
|
|
+ {!! isset($news->section) ? $news->section->position($news->id) : '' !!}
|
|
|
</div>
|
|
|
@endif
|
|
|
@else
|
|
|
- <div class="col-md-4" id="layout_section" style="display:{{(isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_section" style="display:{{ (isset($news) && $news->section_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@endif
|
|
|
-
|
|
|
@if(isset($news))
|
|
|
@if(($news->region_1_id > 0 && $news->region_1_position != '') || (!$news->online && $news->region_1_id > 0))
|
|
|
- <div class="col-md-4" id="layout_region_1" style="display:{{(isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_region_1" style="display:{{ (isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@else
|
|
|
<div class="col-md-4">
|
|
|
- {!! isset($news->region_1) ? $news->region_1->position($news->id) : ''!!}
|
|
|
+ {!! isset($news->region_1) ? $news->region_1->position($news->id) : '' !!}
|
|
|
</div>
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
@else
|
|
|
- <div class="col-md-4" id="layout_region_1" style="display:{{(isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_region_1" style="display:{{ (isset($news) && $news->region_1_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@endif
|
|
|
-
|
|
|
@if(isset($news))
|
|
|
@if(($news->region_2_id > 0 && $news->region_2_position != '') || (!$news->online && $news->region_2_id > 0))
|
|
|
- <div class="col-md-4" id="layout_region_2" style="display:{{(isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_region_2" style="display:{{ (isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@else
|
|
|
<div class="col-md-4">
|
|
|
- {!! isset($news->region_2) ? $news->region_2->position($news->id) : ''!!}
|
|
|
+ {!! isset($news->region_2) ? $news->region_2->position($news->id) : '' !!}
|
|
|
</div>
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
@else
|
|
|
- <div class="col-md-4" id="layout_region_2" style="display:{{(isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none'}}">
|
|
|
-
|
|
|
+ <div class="col-md-4" id="layout_region_2" style="display:{{ (isset($news) && $news->region_2_position != '') || !isset($news) ? 'block' : 'none' }}">
|
|
|
</div>
|
|
|
@endif
|
|
|
-
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-md-6">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('event_id', 'Evento:') !!}
|
|
|
- {!! Form::select('event_id', [null => ''] + $events, null, ['class' => 'form-control']) !!}
|
|
|
- </div>
|
|
|
+ <label for="event_id">Evento:</label>
|
|
|
+ <select name="event_id" id="event_id" class="form-control">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($events as $key => $value)
|
|
|
+ <option value="{{ $key }}" {{ old('event_id', $news->event_id ?? '') == $key ? 'selected' : '' }}>{{ $value }}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('page_id', 'Pagina WEB:') !!}
|
|
|
- {!! Form::select('page_id', [null => ''] + $pages, null, ['class' => 'form-control']) !!}
|
|
|
- </div>
|
|
|
+ <label for="page_id">Pagina WEB:</label>
|
|
|
+ <select name="page_id" id="page_id" class="form-control">
|
|
|
+ <option value=""></option>
|
|
|
+ @foreach($pages as $key => $value)
|
|
|
+ <option value="{{ $key }}" {{ old('page_id', $news->page_id ?? '') == $key ? 'selected' : '' }}>{{ $value }}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="row">
|
|
|
<div class="col-md-6">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('text_short', 'Testo breve:') !!}
|
|
|
- {!! Form::text('text_short', null, array('class' => 'form-control', 'maxlength' => '100')) !!}
|
|
|
- </div>
|
|
|
+ <label for="text_short">Testo breve:</label>
|
|
|
+ <input type="text" name="text_short" id="text_short" class="form-control" maxlength="100" value="{{ old('text_short', $news->text_short ?? '') }}">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('date', 'Data:') !!}
|
|
|
- {!! Form::text('date', isset($news) ? null : date("d/m/Y H:i"), array('class' => 'form-control')) !!}
|
|
|
- </div>
|
|
|
+ <label for="date">Data:</label>
|
|
|
+ <input type="text" name="date" id="date" class="form-control" value="{{ old('date', isset($news) ? $news->date : date('d/m/Y H:i')) }}">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('text', 'Testo:') !!}
|
|
|
- {!! Form::textarea('text', null, array('rows' => 30, 'cols' => 100, 'class' => 'form-control js-editor')) !!}
|
|
|
- </div>
|
|
|
+ <label for="text">Testo:</label>
|
|
|
+ <textarea name="text" id="text" rows="30" cols="100" class="form-control js-editor">{{ old('text', $news->text ?? '') }}</textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
@if(isset($news))
|
|
|
<div class="row">
|
|
|
- <div class="col-md-4">
|
|
|
+ <div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('image', 'Immagine principale:') !!}<br>
|
|
|
- {!! Form::submit('Sostituisci immagine', ['class'=>'btn btn-success', 'name' => 'crop']) !!}
|
|
|
+ <label for="image">Immagine principale:</label><br>
|
|
|
+ <button type="submit" class="btn btn-success" name="crop">Sostituisci immagine</button>
|
|
|
@if(false)
|
|
|
- <div class="custom-file-upload">{!! Form::file('image', null, array('class' => 'form-control')) !!}</div>
|
|
|
+ <div class="custom-file-upload">
|
|
|
+ <input type="file" name="image" id="image" class="form-control">
|
|
|
+ </div>
|
|
|
@endif
|
|
|
@if (isset($news) && $news->image != '')
|
|
|
- <br><img src="/files/news/{{$news->image}}" style="max-width:250px" />
|
|
|
+ <br><img src="/files/news/{{ $news->image }}" style="max-width:250px" />
|
|
|
@endif
|
|
|
@if (isset($_GET["filename"]))
|
|
|
- <br><img src="/files/news/{{$_GET["filename"]}}" style="max-width:250px" />
|
|
|
- <input type="hidden" name="filename" value="{{$_GET["filename"]}}">
|
|
|
+ <br><img src="/files/news/{{ $_GET["filename"] }}" style="max-width:250px" />
|
|
|
+ <input type="hidden" name="filename" value="{{ $_GET["filename"] }}">
|
|
|
@endif
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="col-md-4">
|
|
|
+ <div class="col-md-4">
|
|
|
<div class="form-group">
|
|
|
- {!! Form::label('image1', 'Immagine 1:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image1', null, array('class' => 'form-control')) !!}</div>
|
|
|
+ <label for="image1">Immagine 1:</label><br>
|
|
|
+ <div class="custom-file-upload">
|
|
|
+ <input type="file" name="image1" id="image1" class="form-control">
|
|
|
+ </div>
|
|
|
@if (isset($news) && $news->image1 != '')
|
|
|
- <br><img src="/files/news/{{$news->image1}}" style="max-width:150px" />
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('image2', 'Immagine 2:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image2', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($news) && $news->image2 != '')
|
|
|
- <br><img src="/files/news/{{$news->image2}}" style="max-width:150px" />
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('image3', 'Immagine 3:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image3', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($news) && $news->image3 != '')
|
|
|
- <br><img src="/files/news/{{$news->image3}}" style="max-width:150px" />
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('image4', 'Immagine 4:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image4', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($news) && $news->image4 != '')
|
|
|
- <br><img src="/files/news/{{$news->image4}}" style="max-width:150px" />
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('image5', 'Immagine 5:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image5', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($news) && $news->image5 != '')
|
|
|
- <br><img src="/files/news/{{$news->image5}}" style="max-width:150px" />
|
|
|
- @endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('video', 'Video:') !!}
|
|
|
- {!! Form::textarea('video', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('pdf', 'PDF:') !!}
|
|
|
- <div class="custom-file-upload">{!! Form::file('pdf', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($news) && $news->pdf != '')
|
|
|
- <br><a href="/files/news/{{$news->pdf}}" target="_blank">Visualizza</a>
|
|
|
- <input type="checkbox" name="remove_pdf"> Rimuovi
|
|
|
+ <br><img src="/files/news/{{ $news->image1 }}" style="max-width:150px" />
|
|
|
@endif
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('meta_title', 'Meta - Titolo:') !!}
|
|
|
- {!! Form::text('meta_title', null, array('class' => 'form-control')) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('meta_keywords', 'Meta - Parole chiave:') !!}
|
|
|
- {!! Form::text('meta_keywords', null, array('class' => 'form-control')) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('meta_description', 'Meta - Descrizione:') !!}
|
|
|
- {!! Form::textarea('meta_description', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('slug', 'Slug:') !!}
|
|
|
- {!! Form::text('slug', null, array('class' => 'form-control slug')) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('no_social', 'Selezionando questo flag la news NON viene pubblicata su Facebook/Twitter ma solamente sul sito:') !!}<br>
|
|
|
- {!! Form::checkbox('no_social', 'on', null) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('live', 'Live:') !!}<br>
|
|
|
- {!! Form::checkbox('live', 'on', null) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('breaking_news', 'Breaking news:') !!}<br>
|
|
|
- {!! Form::checkbox('breaking_news', 'on', null) !!}
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <!-- Continue with other image inputs... -->
|
|
|
</div>
|
|
|
- @else
|
|
|
-
|
|
|
- <input type="hidden" name="slug" class="slug">
|
|
|
-
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('image', 'Immagine principale:') !!}<br>
|
|
|
- <div class="custom-file-upload">{!! Form::file('image', null, array('class' => 'form-control')) !!}</div>
|
|
|
- @if (isset($_GET["filename"]))
|
|
|
- <br><img src="/files/news/{{$_GET["filename"]}}" style="max-width:250px" />
|
|
|
- <input type="hidden" name="filename" value="{{$_GET["filename"]}}">
|
|
|
- @endif
|
|
|
- </div>
|
|
|
+ @endif
|
|
|
+ <!-- No social checkbox -->
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="no_social">Selezionando questo flag la news NON viene pubblicata su Facebook/Twitter ma solamente sul sito:</label><br>
|
|
|
+ <input type="checkbox" name="no_social" id="no_social" value="on" {{ old('no_social', $news->no_social ?? '') == 'on' ? 'checked' : '' }}>
|
|
|
</div>
|
|
|
- @if (!isset($_GET["filename"]))
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="form-group">
|
|
|
- {!! Form::label('breaking_news', 'Breaking news:') !!}<br>
|
|
|
- {!! Form::checkbox('breaking_news', 'on', isset($_GET["filename"]) ? false : true) !!}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
</div>
|
|
|
-
|
|
|
- @endif
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="box-footer">
|
|
|
-
|
|
|
- @if(isset($news))
|
|
|
-
|
|
|
- @if($news->user_id > 0 && $news->user_id != Auth::user()->id)
|
|
|
- <span style="color:red; font-weight:bold">ATTENZIONE : l'utente {{$news->user->name}} sta modificando questa news</span><br><br>
|
|
|
+ </div>
|
|
|
+ <!-- Submit buttons -->
|
|
|
+ <div class="box-footer">
|
|
|
+ @if(isset($news) && $news->user_id > 0 && $news->user_id != Auth::user()->id)
|
|
|
+ <span style="color:red; font-weight:bold">ATTENZIONE : l'utente {{ $news->user->name }} sta modificando questa news</span><br><br>
|
|
|
@endif
|
|
|
-
|
|
|
- @endif
|
|
|
-
|
|
|
- {!! Form::submit($submit_text, ['class'=>'btn btn-success saved', 'name' => 'save']) !!}
|
|
|
- {!! Form::submit('Salva ed esci', ['class'=>'btn btn-success saved', 'name' => 'save_exit']) !!}
|
|
|
-
|
|
|
- @if(isset($news))
|
|
|
-
|
|
|
- @if(!$news->online)
|
|
|
- {!! Form::submit('Pubblica', ['class'=>'btn btn-success saved', 'name' => 'publish']) !!}
|
|
|
+ <button type="submit" class="btn btn-success saved" name="save">{{ $submit_text }}</button>
|
|
|
+ <button type="submit" class="btn btn-success saved" name="save_exit">Salva ed esci</button>
|
|
|
+ @if(isset($news))
|
|
|
+ @if(!$news->online)
|
|
|
+ <button type="submit" class="btn btn-success saved" name="publish">Pubblica</button>
|
|
|
+ @else
|
|
|
+ <button type="submit" class="btn btn-success saved" name="unpublish">Torna bozza</button>
|
|
|
+ @endif
|
|
|
@else
|
|
|
- {!! Form::submit('Torna bozza', ['class'=>'btn btn-success saved', 'name' => 'unpublish']) !!}
|
|
|
+ <button type="submit" class="btn btn-success saved" name="publish">Pubblica</button>
|
|
|
@endif
|
|
|
-
|
|
|
- @else
|
|
|
-
|
|
|
- {!! Form::submit('Pubblica', ['class'=>'btn btn-success saved', 'name' => 'publish']) !!}
|
|
|
-
|
|
|
- @endif
|
|
|
-
|
|
|
- {!! link_to_route('news.index', 'Annulla', null, array('class' => 'btn btn-info')) !!}
|
|
|
-
|
|
|
+ <a href="{{ route('news.index') }}" class="btn btn-info">Annulla</a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -375,9 +257,9 @@
|
|
|
<script src="/backend/plugins/daterangepicker/daterangepicker.js"></script>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
+
|
|
|
$(function () {
|
|
|
-
|
|
|
+
|
|
|
$('form').on('submit', function(e){
|
|
|
if($("#page_id").val() == '')
|
|
|
{
|
|
|
@@ -403,7 +285,7 @@
|
|
|
|
|
|
$('.js-editor').summernote({
|
|
|
height: 300,
|
|
|
- lang: 'it-IT'
|
|
|
+ lang: 'it-IT'
|
|
|
});
|
|
|
|
|
|
$("[name='date']").daterangepicker({ singleDatePicker: true, timePicker: true, timePicker24Hour: true, locale: { format: 'DD/MM/YYYY HH:mm' }})
|
|
|
@@ -413,7 +295,7 @@
|
|
|
var Text = $(this).val();
|
|
|
Text = Text.toLowerCase();
|
|
|
Text = Text.replace(/[^a-zA-Z0-9]+/g,'-');
|
|
|
- $(".slug").val(Text);
|
|
|
+ $(".slug").val(Text);
|
|
|
});
|
|
|
@endif
|
|
|
|
|
|
@@ -421,14 +303,14 @@
|
|
|
|
|
|
const max = 100;
|
|
|
const len = $(this).val().length;
|
|
|
-
|
|
|
- if (len >= max)
|
|
|
+
|
|
|
+ if (len >= max)
|
|
|
{
|
|
|
$('#chars').text("0 caratteri rimanenti");
|
|
|
- }
|
|
|
- else
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
const char = max - len;
|
|
|
$('#chars').text(char + ' caratteri rimanenti');
|
|
|
}
|
|
|
@@ -438,14 +320,14 @@
|
|
|
|
|
|
const max = 100;
|
|
|
const len = $(this).val().length;
|
|
|
-
|
|
|
- if (len >= max)
|
|
|
+
|
|
|
+ if (len >= max)
|
|
|
{
|
|
|
$('#chars_region_1').text("0 caratteri rimanenti");
|
|
|
- }
|
|
|
- else
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
const char = max - len;
|
|
|
$('#chars_region_1').text(char + ' caratteri rimanenti');
|
|
|
}
|
|
|
@@ -455,19 +337,19 @@
|
|
|
|
|
|
const max = 100;
|
|
|
const len = $(this).val().length;
|
|
|
-
|
|
|
- if (len >= max)
|
|
|
+
|
|
|
+ if (len >= max)
|
|
|
{
|
|
|
$('#chars_region_2').text("0 caratteri rimanenti");
|
|
|
- }
|
|
|
- else
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
const char = max - len;
|
|
|
$('#chars_region_2').text(char + ' caratteri rimanenti');
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
$(".section_id_change").change(function(){
|
|
|
var layout = layouts[this.value];
|
|
|
loadLayoutSection(layout, 'section');
|
|
|
@@ -505,7 +387,7 @@
|
|
|
$("#region_2_position").val('');
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
$(document). on("click", ".btSelect" , function() {
|
|
|
var where = $(this).attr('data-where');
|
|
|
$(".boxLayout." + where).attr('style', 'border:1px solid gray; padding:10px;background-color: white !important');
|
|
|
@@ -633,4 +515,4 @@
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
-@stop
|
|
|
+@stop
|