Dodaj widok błędu dla nieistniejących ofert pracy oraz walidację w metodzie szczegółów ogłoszenia
This commit is contained in:
@@ -97,6 +97,14 @@ class GlobelusAdverts
|
|||||||
|
|
||||||
$page['language']['canonical'] = $base . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
$page['language']['canonical'] = $base . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
|
if ( !$advert_details['id'] )
|
||||||
|
{
|
||||||
|
return \Tpl::view( 'globelus/adverts/advert-not-found', [
|
||||||
|
'g_user' => $g_user,
|
||||||
|
'advert_id' => \S::get( 'advert_id' )
|
||||||
|
] );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ( !$advert_details['visible'] or $advert_details['old'] ) and $advert_details['user_id'] != $g_user['id'] ) {
|
if ( ( !$advert_details['visible'] or $advert_details['old'] ) and $advert_details['user_id'] != $g_user['id'] ) {
|
||||||
header( 'Location: /' );
|
header( 'Location: /' );
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
16
templates_user/globelus/adverts/advert-not-found.php
Normal file
16
templates_user/globelus/adverts/advert-not-found.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<div class="_login_box _single">
|
||||||
|
<div class="_left">
|
||||||
|
<div class="_question">
|
||||||
|
<div class="_title">Oferta pracy nie istnieje</div>
|
||||||
|
<div class="_text">Przykro nam, ale oferta pracy, której szukaj już nie istnieje.<br>Skorzystaj z <a href="https://www.globelus.pl/oferty-pracy">wyszukiwarki i sprawdź aktualne oferty</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="_partners">
|
||||||
|
<div class="_title">Partnerzy globelus.pl</div>
|
||||||
|
<div class="_content">
|
||||||
|
<img src="/images/logo-jooble.png" alt="jooble">
|
||||||
|
<img src="/images/logo-cvwizard.png" alt="cvwizard">
|
||||||
|
<img src="/images/logo-megapraca.jpg" alt="megapraca">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user