Improved style of error messages.
This commit is contained in:
parent
a400ae3262
commit
c92e4c0f9a
4 changed files with 11 additions and 12 deletions
|
@ -119,10 +119,10 @@ class App.TicketZoom extends App.Controller
|
||||||
# show error message
|
# show error message
|
||||||
if xhr.status is 401 || error is 'Unauthorized'
|
if xhr.status is 401 || error is 'Unauthorized'
|
||||||
@taskTitle = '» ' + App.i18n.translateInline('Unauthorized') + ' «'
|
@taskTitle = '» ' + App.i18n.translateInline('Unauthorized') + ' «'
|
||||||
@html App.view('generic/error/unauthorized')()
|
@html App.view('generic/error/unauthorized')( objectName: 'Ticket' )
|
||||||
else if xhr.status is 404 || error is 'Not Found'
|
else if xhr.status is 404 || error is 'Not Found'
|
||||||
@taskTitle = '» ' + App.i18n.translateInline('Not Found') + ' «'
|
@taskTitle = '» ' + App.i18n.translateInline('Not Found') + ' «'
|
||||||
@html App.view('generic/error/not_found')()
|
@html App.view('generic/error/not_found')( objectName: 'Ticket' )
|
||||||
else
|
else
|
||||||
@taskTitle = '» ' + App.i18n.translateInline('Error') + ' «'
|
@taskTitle = '» ' + App.i18n.translateInline('Error') + ' «'
|
||||||
status = xhr.status
|
status = xhr.status
|
||||||
|
@ -132,6 +132,7 @@ class App.TicketZoom extends App.Controller
|
||||||
@html App.view('generic/error/generic')(
|
@html App.view('generic/error/generic')(
|
||||||
status: status
|
status: status
|
||||||
detail: detail
|
detail: detail
|
||||||
|
objectName: 'Ticket'
|
||||||
)
|
)
|
||||||
|
|
||||||
# update current task title
|
# update current task title
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="main flex">
|
<div class="flex fullscreenMessage">
|
||||||
<h1><%- @T('Error') %></h1>
|
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, something went wrong!' ) %></h2>
|
||||||
<p><%- @T('Status Code') %>: <%= @status %></p>
|
<p><%- @T('Status Code') %>: <%= @status %></p>
|
||||||
<p><%= @detail %></p>
|
<p><%= @detail %></p>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,3 @@
|
||||||
<div class="main flex">
|
<div class="flex fullscreenMessage">
|
||||||
<h1><%- @T('Not Found') %></h1>
|
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, but I can\'t find this %s.', @objectName ) %></h2>
|
||||||
<p><%- @T('Sorry, unable to find this ressource.') %></p>
|
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,3 @@
|
||||||
<div class="main flex">
|
<div class="flex fullscreenMessage">
|
||||||
<h1><%- @T('Unauthorized') %></h1>
|
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, but you have insufficient rights to open this %s.', @objectName ) %></h2>
|
||||||
<p><%- @T('Sorry, you are not allowed to access this ressource.') %></p>
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue