correct active routes in backend

This commit is contained in:
Arno Kaimbacher 2019-04-23 13:30:22 +02:00
parent fa31100c2e
commit 0f5e345467
8 changed files with 74 additions and 44 deletions

20
composer.lock generated
View File

@ -1697,16 +1697,16 @@
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.2.0", "version": "v6.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707" "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1755,7 +1755,7 @@
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2019-03-10T07:52:41+00:00" "time": "2019-04-21T09:21:45+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
@ -3802,16 +3802,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "7.5.8", "version": "7.5.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a" "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c29c0525cf4572c11efe1db49a8b8aee9dfac58a", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/134669cf0eeac3f79bc7f0c793efbc158bffc160",
"reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a", "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3882,7 +3882,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2019-03-26T13:23:54+00:00" "time": "2019-04-19T15:50:46+00:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",

View File

@ -323,6 +323,19 @@ appears on the left side of the page.
color: #2097e6; color: #2097e6;
background: #1d272e; background: #1d272e;
} }
#menu .pure-menu li.active a::after {
right: 0;
border: solid 8px transparent;
border-right-color: transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-right-color: #f1f1f1;
top: 50%;
margin-top: -8px;
}
/* /*
This styles the selected menu item `<li>`. This styles the selected menu item `<li>`.
@ -908,6 +921,8 @@ textarea.large, input.large {
} }
.dropbox { .dropbox {
outline: 2px dashed grey; /* the dash box */ outline: 2px dashed grey; /* the dash box */
outline-offset: -10px; outline-offset: -10px;
@ -943,6 +958,7 @@ textarea.large, input.large {
} }
.pure-table tr.inprogress { .pure-table tr.inprogress {
padding: 0.8em; padding: 0.8em;
background-color: paleturquoise; background-color: paleturquoise;

View File

@ -42,7 +42,7 @@
</li> --}} </li> --}}
<li class="{{ active_class(Route::is('settings.dashboard')) }}"> <li class="pure-menu-item {{ active_class(Route::is('settings.dashboard')) }}">
<a href="{{ route('settings.dashboard') }}"> <a href="{{ route('settings.dashboard') }}">
<i class="fa fa-tachometer-alt"></i> <i class="fa fa-tachometer-alt"></i>
<span>Reports</span> <span>Reports</span>
@ -59,7 +59,7 @@
{{-- <li class="pure-menu-item {{ Route::is('settings.collection*') ? 'active' : '' }}"> {{-- <li class="pure-menu-item {{ Route::is('settings.collection*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ route('settings.collection') }}"><i class="fa fa-archive"></i> Collections</a> <a class="pure-menu-link" href="{{ route('settings.collection') }}"><i class="fa fa-archive"></i> Collections</a>
</li> --}} </li> --}}
<li class="pure-menu-item {{ Route::is('settings.collectionrole') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('settings.collectionrole*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ route('settings.collectionrole.index') }}"><i class="fa fa-archive"></i> Collection Roles</a> <a class="pure-menu-link" href="{{ route('settings.collectionrole.index') }}"><i class="fa fa-archive"></i> Collection Roles</a>
</li> </li>
<li class="pure-menu-item {{ Route::is('settings.license*') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('settings.license*') ? 'active' : '' }}">
@ -72,12 +72,12 @@
<a class="pure-menu-link" href="{{ route('settings.project') }}"><i class="fa fa-tasks"></i> Projects</a> <a class="pure-menu-link" href="{{ route('settings.project') }}"><i class="fa fa-tasks"></i> Projects</a>
</li> </li>
<li class="pure-menu-item {{ Route::is('settings.mimetype') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('settings.mimetype*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ route('settings.mimetype.index') }}"><i class="fas fa-file-code"></i> Mimetypes</a> <a class="pure-menu-link" href="{{ route('settings.mimetype.index') }}"><i class="fas fa-file-code"></i> Mimetypes</a>
</li> </li>
@permission('page') @permission('page')
<li class="{{ active_class(Active::checkUriPattern('settings/page*')) }}"> <li class="pure-menu-item {{ Route::is('settings.page*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ route('settings.page.index') }}"> <a class="pure-menu-link" href="{{ route('settings.page.index') }}">
<i class="fas fa-file-signature"></i> <i class="fas fa-file-signature"></i>
<span>{{ trans('labels.backend.pages.title') }}</span> <span>{{ trans('labels.backend.pages.title') }}</span>
@ -99,22 +99,22 @@
</li> </li>
@endpermission @endpermission
@permission('dataset-list') @permission('dataset-list')
<li class="pure-menu-item {{ Route::is('publish.workflow.index') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('publish.workflow.submit*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.index') }}"><i class="fas fa-list"></i> All my datasets</a> <a class="pure-menu-link" href="{{ URL::route('publish.workflow.submit.index') }}"><i class="fas fa-list"></i> All my datasets</a>
</li> </li>
@endpermission @endpermission
@permission('dataset-editor-list') @permission('dataset-editor-list')
<li class="pure-menu-item {{ Route::is('publish.workflow.editor.index') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('publish.workflow.editor*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.editor.index') }}"><i class="fas fa-list"></i> EDITOR PAGE: Released datasets</a> <a class="pure-menu-link" href="{{ URL::route('publish.workflow.editor.index') }}"><i class="fas fa-list"></i> EDITOR PAGE: Released datasets</a>
</li> </li>
@endpermission @endpermission
@permission('dataset-review-list') @permission('dataset-review-list')
<li class="pure-menu-item {{ Route::is('publish.workflow.review.index') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('publish.workflow.review*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.review.index') }}"><i class="fas fa-list"></i> REVIEW PAGE: Approved datasets</a> <a class="pure-menu-link" href="{{ URL::route('publish.workflow.review.index') }}"><i class="fas fa-list"></i> REVIEW PAGE: Approved datasets</a>
</li> </li>
@endpermission @endpermission
@permission('dataset-publish-list') @permission('dataset-publish-list')
<li class="pure-menu-item {{ Route::is('publish.workflow.publish.index') ? 'active' : '' }}"> <li class="pure-menu-item {{ Route::is('publish.workflow.publish*') ? 'active' : '' }}">
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.publish.index') }}"><i class="fas fa-list"></i> Publish PAGE: Reviewed datasets</a> <a class="pure-menu-link" href="{{ URL::route('publish.workflow.publish.index') }}"><i class="fas fa-list"></i> Publish PAGE: Reviewed datasets</a>
</li> </li>
@endpermission @endpermission
@ -158,9 +158,9 @@
<a class="pure-menu-link" href="{{ route('access.user.edit',['id'=>Auth::user()->id]) }}"><i class="fa fa-user"></i> EDIT</a> <a class="pure-menu-link" href="{{ route('access.user.edit',['id'=>Auth::user()->id]) }}"><i class="fa fa-user"></i> EDIT</a>
</li> </li>
@endpermission @endpermission
<li class="pure-menu-item"> {{-- <li class="pure-menu-item">
<a class="pure-menu-link" href="{{ route('logout') }}"><i class="fas fa-sign-out-alt"></i></i>Logout</a> <a class="pure-menu-link" href="{{ route('logout') }}"><i class="fas fa-sign-out-alt"></i> Logout</a>
</li> </li> --}}
@endif @endif
</ul> </ul>
</li> </li>
@ -175,15 +175,29 @@
<div class="header"> <div class="header">
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1-2"> <div class="pure-u-1-2">
<h1>Dashboard</h1> {{--
<h1>Dashboard</h1> --}}
<section class="user-info">
<i class="fas fa-home"></i>
<a class=" pure-menu-linkab-item" aria-haspopup="true" href="https://s1.demo.opensourcecms.com/wordpress/">
repository
</a>
</section>
</div> </div>
<div class="pure-u-1-2 text-right"> <div class="pure-u-1-2 text-right">
<section class="user-info"> <section class="user-info">
@if(Auth::user()) @if(Auth::user())
<i class="fa fa-user"></i> <a href="#" rel="User">{{ Auth::user()->login }}</a> <i class="fa fa-user"></i> <a href="#" rel="User">{{ Auth::user()->login }}</a>
<span class="divider"></span> <span class="divider"></span>
<i class="fas fa-sign-out-alt"></i><a href="{{ route('logout') }}">Logout</a>
{{-- <span class="divider"></span> --}}
@else
<i class="fa fa-user"></i>
<a href="{{ route('login') }}">LOGIN</a>
@endif @endif
<i class="fa fa-cog"></i> <a href="#" rel="User">Settings</a>
{{-- <i class="fa fa-cog"></i> <a href="#" rel="User">Settings</a> --}}
</section> </section>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@
<td> <td>
@if ($dataset->server_state == "released") @if ($dataset->server_state == "released")
<a href="{{ URL::route('publish.workflow.receive', $dataset->id) }}" class="pure-button"> <a href="{{ URL::route('publish.workflow.editor.receive', $dataset->id) }}" class="pure-button">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
<span>Receive editor task</span> <span>Receive editor task</span>
</a> </a>

View File

@ -26,7 +26,7 @@
$message = 'If you are not the desired editor, you can still accept the dataset!!'; $message = 'If you are not the desired editor, you can still accept the dataset!!';
@endphp @endphp
{!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.receiveUpdate', $dataset->id], 'id' => 'acceptForm', {!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.editor.receiveUpdate', $dataset->id], 'id' => 'acceptForm',
'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!} 'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!}
<fieldset id="fieldset-General"> <fieldset id="fieldset-General">
<legend>General</legend> <legend>General</legend>

View File

@ -55,7 +55,7 @@
<td> <td>
@if ($dataset->server_state == "inprogress") @if ($dataset->server_state == "inprogress")
<a href="{{ URL::route('publish.workflow.release', $dataset->id) }}" class="pure-button"> <a href="{{ URL::route('publish.workflow.submit.release', $dataset->id) }}" class="pure-button">
<i class="fa fa-share"></i> <i class="fa fa-share"></i>
<span>Release</span> <span>Release</span>
</a> </a>

View File

@ -16,13 +16,13 @@
<div class="pure-u-1 pure-u-md-1"> <div class="pure-u-1 pure-u-md-1">
<div> <div>
<a href="{{ route('publish.workflow.index') }}" class="pure-button button-small"> <a href="{{ route('publish.workflow.submit.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
<span>BACK</span> <span>BACK</span>
</a> </a>
</div> </div>
<div id="app1"> <div id="app1">
{!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.releaseUpdate', $dataset->id], 'id' => 'releaseForm', {!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.submit.releaseUpdate', $dataset->id], 'id' => 'releaseForm',
'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!} 'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!}
<fieldset id="fieldset-General"> <fieldset id="fieldset-General">
<legend>General</legend> <legend>General</legend>

View File

@ -55,17 +55,17 @@ Route::group(
'uses' => 'IndexController@store', 'uses' => 'IndexController@store',
]); ]);
Route::get('workflow/index', [ Route::get('workflow/submit/index', [
'middleware' => ['permission:dataset-list'], 'middleware' => ['permission:dataset-list'],
'as' => 'workflow.index', 'uses' => 'SubmitController@index', 'as' => 'workflow.submit.index', 'uses' => 'SubmitController@index',
]); ]);
Route::get('workflow/release/{id}', [ Route::get('workflow/submit/release/{id}', [
'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'], 'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'],
'as' => 'workflow.release', 'uses' => 'SubmitController@release', 'as' => 'workflow.submit.release', 'uses' => 'SubmitController@release',
]); ]);
Route::post('workflow/release/{id}', [ Route::post('workflow/submit/release/{id}', [
'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'], 'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'],
'as' => 'workflow.releaseUpdate', 'uses' => 'SubmitController@releaseUpdate', 'as' => 'workflow.submit.releaseUpdate', 'uses' => 'SubmitController@releaseUpdate',
]); ]);
Route::get('workflow/delete/{id}', [ Route::get('workflow/delete/{id}', [
'middleware' => ['isUserDatasetAdmin:true'], 'middleware' => ['isUserDatasetAdmin:true'],
@ -77,27 +77,27 @@ Route::group(
'middleware' => ['permission:dataset-editor-list'], 'middleware' => ['permission:dataset-editor-list'],
'as' => 'workflow.editor.index', 'uses' => 'EditorController@index', 'as' => 'workflow.editor.index', 'uses' => 'EditorController@index',
]); ]);
Route::get('workflow/receive/{id}', [ Route::get('workflow/editor/receive/{id}', [
'middleware' => ['permission:dataset-receive'], 'middleware' => ['permission:dataset-receive'],
'as' => 'workflow.receive', 'uses' => 'EditorController@receive', 'as' => 'workflow.editor.receive', 'uses' => 'EditorController@receive',
]); ]);
Route::post('workflow/receive/{id}', [ Route::post('workflow/editor/receive/{id}', [
'middleware' => ['permission:dataset-receive'], 'middleware' => ['permission:dataset-receive'],
'as' => 'workflow.receiveUpdate', 'uses' => 'EditorController@receiveUpdate', 'as' => 'workflow.editor.receiveUpdate', 'uses' => 'EditorController@receiveUpdate',
]); ]);
Route::get('workflow/edit/{id}', [ Route::get('workflow/editor/edit/{id}', [
'middleware' => ['permission:dataset-editor-update'], 'middleware' => ['permission:dataset-editor-update'],
'as' => 'workflow.editor.edit', 'uses' => 'EditorController@edit', 'as' => 'workflow.editor.edit', 'uses' => 'EditorController@edit',
]); ]);
Route::post('workflow/edit/{id}', [ Route::post('workflow/editor/edit/{id}', [
'middleware' => ['permission:dataset-editor-update'], 'middleware' => ['permission:dataset-editor-update'],
'as' => 'workflow.editor.update', 'uses' => 'EditorController@update', 'as' => 'workflow.editor.update', 'uses' => 'EditorController@update',
]); ]);
Route::get('workflow/approve/{id}', [ Route::get('workflow/editor/approve/{id}', [
'middleware' => ['permission:dataset-approve'], 'middleware' => ['permission:dataset-approve'],
'as' => 'workflow.editor.approve', 'uses' => 'EditorController@approve', 'as' => 'workflow.editor.approve', 'uses' => 'EditorController@approve',
]); ]);
Route::post('workflow/approve/{id}', [ Route::post('workflow/editor/approve/{id}', [
'middleware' => ['permission:dataset-approve'], 'middleware' => ['permission:dataset-approve'],
'as' => 'workflow.editor.approveUpdate', 'uses' => 'EditorController@approveUpdate', 'as' => 'workflow.editor.approveUpdate', 'uses' => 'EditorController@approveUpdate',
]); ]);
@ -196,7 +196,7 @@ Route::group(
], ],
function () { function () {
//Route::resource('page', 'PageController', ['except' => ['show', 'update']]); //Route::resource('page', 'PageController', ['except' => ['show', 'update']]);
Route::get('user', [ Route::get('page', [
'as' => 'page.index', 'uses' => 'PageController@index', 'as' => 'page.index', 'uses' => 'PageController@index',
]); ]);
Route::get('page/edit/{page}', [ Route::get('page/edit/{page}', [