Compare commits
No commits in common. "7d1406ee5cfa18f45505362e246f4fb7193df4ea" and "6156bdf0c63f27a9642ec2b457e6ac99933a3c01" have entirely different histories.
7d1406ee5c
...
6156bdf0c6
|
@ -53,7 +53,7 @@ class SitelinkController extends Controller
|
|||
->whereYear('server_date_published', '>=', $from)
|
||||
->whereYear('server_date_published', '<', $until);
|
||||
|
||||
$documents = $select->orderBy('publish_id')
|
||||
$documents = $select->orderBy('publish_id', 'asc')
|
||||
->get();
|
||||
|
||||
//$this->years = Dataset::select(DB::raw('YEAR(server_date_modified) as server_date_modified'))
|
||||
|
|
|
@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use \Exception;
|
||||
// use Illuminate\Support\Carbon;
|
||||
// use Carbon\Carbon;
|
||||
use \Illuminate\Support\Carbon;
|
||||
|
||||
class RequestController extends Controller
|
||||
|
|
|
@ -64,7 +64,7 @@ class DoiController extends Controller
|
|||
{
|
||||
$datasets = Dataset::query()
|
||||
->has('identifier')
|
||||
->orderByDesc('server_date_modified')
|
||||
->orderBy('server_date_modified', 'desc')
|
||||
->get();
|
||||
return View::make('workflow.doi.index', [
|
||||
'datasets' => $datasets,
|
||||
|
|
|
@ -18,7 +18,7 @@ use App\Models\User;
|
|||
use App\Rules\RdrFilesize;
|
||||
use App\Rules\RdrFiletypes;
|
||||
// use Illuminate\View\View;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
@ -87,7 +87,7 @@ class EditorController extends Controller
|
|||
$query->whereIn('server_state', ['editor_accepted', 'rejected_reviewer', 'reviewed', 'published'])
|
||||
->where('editor_id', $user_id)->doesntHave('identifier', 'and');
|
||||
})
|
||||
->orderByDesc('server_date_modified')
|
||||
->orderBy('server_date_modified', 'desc')
|
||||
->get();
|
||||
// return View::make('workflow.editor.index', compact('datasets'));
|
||||
return View::make('workflow.editor.index', [
|
||||
|
|
|
@ -82,7 +82,7 @@ class ReviewController extends Controller
|
|||
$fieldval = $fieldValue->{$property_name};
|
||||
$value = $value . $fieldName . ": " . $fieldval . "; ";
|
||||
}
|
||||
} elseif ($fieldValue instanceof \Illuminate\Support\Carbon) {
|
||||
} elseif ($fieldValue instanceof \Carbon\Carbon) {
|
||||
$value = $value . " Year " . $fieldValue->year;
|
||||
$value = $value . " Month " . $fieldValue->month;
|
||||
$value = $value . " Day " . $fieldValue->day;
|
||||
|
|
|
@ -47,7 +47,7 @@ class SubmitController extends Controller
|
|||
'released', 'editor_accepted', 'approved', 'reviewed', 'rejected_editor', 'rejected_reviewer'])
|
||||
->where('account_id', $user_id)
|
||||
->with('user:id,login')
|
||||
->orderByDesc('server_date_modified')
|
||||
->orderBy('server_date_modified', 'desc')
|
||||
->get();
|
||||
return View::make('workflow.submitter.index', [
|
||||
'datasets' => $myDatasets,
|
||||
|
|
|
@ -30,7 +30,7 @@ class UserController extends Controller
|
|||
//}
|
||||
|
||||
$users = User::with('roles')
|
||||
->orderByDesc('id')
|
||||
->orderBy('id', 'DESC')
|
||||
->paginate(5);
|
||||
return view('settings.access.user.user', compact('users'))
|
||||
->with('i', ($request->input('page', 1) - 1) * 5);
|
||||
|
|
|
@ -27,13 +27,8 @@ class CollectionRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'role_id' => [
|
||||
'required',
|
||||
],
|
||||
'name' => 'required|max:255',
|
||||
'role_id' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,13 +24,8 @@ class DocumentRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'type' => [
|
||||
'required',
|
||||
'min:3',
|
||||
],
|
||||
'server_state' => [
|
||||
'required',
|
||||
],
|
||||
'type' => 'required|min:3',
|
||||
'server_state' => 'required',
|
||||
// 'author' => 'required|min:4',
|
||||
// 'stock' => 'required|integer',
|
||||
// 'year' => 'required|integer|min:4'
|
||||
|
|
|
@ -24,40 +24,15 @@ class LicenseRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'desc_text' => [
|
||||
'max:4000',
|
||||
],
|
||||
'language' => [
|
||||
'max:3',
|
||||
],
|
||||
'link_licence' => [
|
||||
'required',
|
||||
'url:max:255',
|
||||
],
|
||||
'link_logo' => [
|
||||
'url',
|
||||
'max:255',
|
||||
],
|
||||
'mime_type' => [
|
||||
'max:30',
|
||||
],
|
||||
'name_long' => [
|
||||
'required',
|
||||
'min:5',
|
||||
'max:255',
|
||||
],
|
||||
'sort_order' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'active' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'pod_allowed' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'desc_text' => 'max:4000',
|
||||
'language' => 'max:3',
|
||||
'link_licence' => 'required|url:max:255',
|
||||
'link_logo' => 'url|max:255',
|
||||
'mime_type' => 'max:30',
|
||||
'name_long' => 'required|min:5|max:255',
|
||||
'sort_order' => 'required|integer',
|
||||
'active' => 'required|boolean',
|
||||
'pod_allowed' => 'required|boolean'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,10 +28,7 @@ class UpdatePageRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'en_title' => [
|
||||
'required',
|
||||
'max:191',
|
||||
],
|
||||
'en_title' => 'required|max:191'
|
||||
// 'description_en' => 'required'
|
||||
];
|
||||
}
|
||||
|
|
30
app/Http/Requests/PeminjamanRequest.php
Executable file
30
app/Http/Requests/PeminjamanRequest.php
Executable file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class PeminjamanRequest extends Request
|
||||
{
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
29
app/Http/Requests/PeriodeRequest.php
Executable file
29
app/Http/Requests/PeriodeRequest.php
Executable file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class PeriodeRequest extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'days' => 'required|integer'
|
||||
];
|
||||
}
|
||||
}
|
|
@ -24,45 +24,17 @@ class CreatePersonRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'academic_title' => [
|
||||
'nullable',
|
||||
'min:2',
|
||||
'max:255',
|
||||
],
|
||||
'last_name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
'unique_with:persons,first_name,date_of_birth',
|
||||
],
|
||||
'first_name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
],
|
||||
'email' => [
|
||||
'required',
|
||||
'email',
|
||||
'max:50',
|
||||
'unique:persons,email',
|
||||
],
|
||||
'academic_title' => 'nullable|min:2|max:255',
|
||||
'last_name' => 'required|min:3|max:255|unique_with:persons,first_name,date_of_birth',
|
||||
'first_name' => 'required|min:3|max:255',
|
||||
'email' => 'required|email|max:50|unique:persons,email',
|
||||
// 'email' => [
|
||||
// 'required', 'email', 'max:100',
|
||||
// Rule::unique('persons')->ignore($user->id),
|
||||
// ],
|
||||
'identifier_orcid' => [
|
||||
'nullable',
|
||||
'min:19',
|
||||
'max:50',
|
||||
],
|
||||
'status' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'date_of_birth' => [
|
||||
'nullable',
|
||||
'date',
|
||||
],
|
||||
'identifier_orcid' => 'nullable|min:19|max:50',
|
||||
'status' => 'required|boolean',
|
||||
'date_of_birth' => 'nullable|date'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,45 +26,17 @@ class EditPersonRequest extends Request
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'academic_title' => [
|
||||
'nullable',
|
||||
'min:2',
|
||||
'max:255',
|
||||
],
|
||||
'last_name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
'unique_with:persons,first_name,date_of_birth',
|
||||
],
|
||||
'first_name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
],
|
||||
'email' => [
|
||||
'required',
|
||||
'email',
|
||||
'max:50',
|
||||
'unique:persons,email',
|
||||
],
|
||||
'academic_title' => 'nullable|min:2|max:255',
|
||||
'last_name' => 'required|min:3|max:255|unique_with:persons,first_name,date_of_birth',
|
||||
'first_name' => 'required|min:3|max:255',
|
||||
'email' => 'required|email|max:50|unique:persons,email',
|
||||
// 'email' => [
|
||||
// 'required', 'email', 'max:100',
|
||||
// Rule::unique('persons')->ignore($user->id),
|
||||
// ],
|
||||
'identifier_orcid' => [
|
||||
'nullable',
|
||||
'min:19',
|
||||
'max:50',
|
||||
],
|
||||
'status' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'date_of_birth' => [
|
||||
'nullable',
|
||||
'date',
|
||||
],
|
||||
'identifier_orcid' => 'nullable|min:19|max:50',
|
||||
'status' => 'required|boolean',
|
||||
'date_of_birth' => 'nullable|date'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,19 +24,9 @@ class ProjectRequest extends Request
|
|||
{
|
||||
return [
|
||||
|
||||
'name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
],
|
||||
'label' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:20',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
],
|
||||
'name' => 'required|min:3|max:255',
|
||||
'label' => 'required|min:3|max:20',
|
||||
'description' => 'required'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
30
app/Http/Requests/ShelfRequest.php
Executable file
30
app/Http/Requests/ShelfRequest.php
Executable file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class ShelfRequest extends Request
|
||||
{
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'shelf' => 'required'
|
||||
];
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
namespace App\Library\Util;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* Describes local document as a match in context of a related search query.
|
||||
|
|
|
@ -234,7 +234,7 @@ trait DatasetExtension
|
|||
if (true === empty($fieldval)) {
|
||||
$fieldval = null;
|
||||
} else {
|
||||
$fieldval = new \Illuminate\Support\Carbon($fieldval);
|
||||
$fieldval = new \Carbon\Carbon($fieldval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ class Strategy
|
|||
|
||||
if ($value instanceof \Illuminate\Database\Eloquent\Model) {
|
||||
$this->_mapModelAttributes($value, $dom, $childNode);
|
||||
} elseif ($value instanceof \Illuminate\Support\Carbon) {
|
||||
} elseif ($value instanceof \Carbon\Carbon) {
|
||||
$this->_mapDateAttributes($value, $dom, $childNode);
|
||||
} elseif (is_array($value)) {
|
||||
$this->_mapArrayAttributes($value, $dom, $childNode);
|
||||
|
@ -181,7 +181,7 @@ class Strategy
|
|||
return $dom->createElement($fieldName);
|
||||
}
|
||||
|
||||
protected function _mapDateAttributes(\Illuminate\Support\Carbon $model, DOMDocument $dom, \DOMNode $rootNode)
|
||||
protected function _mapDateAttributes(\Carbon\Carbon $model, DOMDocument $dom, \DOMNode $rootNode)
|
||||
{
|
||||
$rootNode->setAttribute("Year", $model->year);
|
||||
$rootNode->setAttribute("Month", $model->month);
|
||||
|
|
|
@ -15,7 +15,7 @@ use App\Models\Title;
|
|||
use App\Models\User;
|
||||
use App\Models\XmlCache;
|
||||
use App\Models\DatasetIdentifier;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
// use App\Models\GeolocationBox;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
@ -301,7 +301,7 @@ class Dataset extends Model
|
|||
$result = Dataset::select('server_date_published')
|
||||
->where('server_date_published', '<>', null)
|
||||
->where('server_state', 'published')
|
||||
->orderBy('server_date_published')
|
||||
->orderBy('server_date_published', 'asc')
|
||||
->first();
|
||||
//->server_date_published;
|
||||
return $result;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace App\Rules;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Contracts\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
|
@ -103,7 +102,7 @@ class RdrFilesize implements Rule
|
|||
private function getSize($attribute, $value)
|
||||
{
|
||||
if (is_numeric($value) && $hasNumeric) {
|
||||
return Arr::get($this->data, $attribute);
|
||||
return array_get($this->data, $attribute);
|
||||
} elseif (is_array($value)) {
|
||||
return count($value);
|
||||
} elseif ($value instanceof File) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Support\Carbon;
|
||||
// use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Support\Carbon;
|
||||
// use Carbon\Carbon;
|
||||
// use Database\DisableForeignKeys;
|
||||
// use Database\TruncateTable;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
// use Database\DisableForeignKeys;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
use Carbon\Carbon;
|
||||
// use Database\DisableForeignKeys;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
{{-- <div class="form-group">
|
||||
{!! Form::label('licenses[]', 'Licenses..') !!}
|
||||
{!! Form::select('licenses[]', $options, Arr::pluck($document->licenses, 'id'), ['multiple' ]) !!}
|
||||
{!! Form::select('licenses[]', $options, array_pluck($document->licenses, 'id'), ['multiple' ]) !!}
|
||||
</div> --}}
|
||||
|
||||
<div class="pure-control-group checkboxlist">
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<td>
|
||||
{{-- @php
|
||||
$dateDiff = $dataset['server_date_modified']->addDays(14);
|
||||
$remainingDays = Illuminate\Support\Carbon::now()->diffInDays($dateDiff, false);
|
||||
$remainingDays = Carbon\Carbon::now()->diffInDays($dateDiff, false);
|
||||
@endphp --}}
|
||||
|
||||
{{ $dataset->remaining_time . ' days' }}
|
||||
|
|
|
@ -70,7 +70,7 @@ $appRoutes = function () {
|
|||
->whereYear('server_date_published', '>=', $from)
|
||||
->whereYear('server_date_published', '<', $until);
|
||||
|
||||
$documents = $select->orderBy('publish_id')
|
||||
$documents = $select->orderBy('publish_id', 'asc')
|
||||
->get();
|
||||
return response()
|
||||
->json($documents)
|
||||
|
@ -118,7 +118,7 @@ $appRoutes = function () {
|
|||
$query = $query->orderBy($sortCol, $sortDir);
|
||||
}
|
||||
} else {
|
||||
$query = $query->orderBy('id');
|
||||
$query = $query->orderBy('id', 'asc');
|
||||
}
|
||||
|
||||
//handle filter
|
||||
|
|
Loading…
Reference in New Issue
Block a user