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
|
||||
if xhr.status is 401 || error is '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'
|
||||
@taskTitle = '» ' + App.i18n.translateInline('Not Found') + ' «'
|
||||
@html App.view('generic/error/not_found')()
|
||||
@html App.view('generic/error/not_found')( objectName: 'Ticket' )
|
||||
else
|
||||
@taskTitle = '» ' + App.i18n.translateInline('Error') + ' «'
|
||||
status = xhr.status
|
||||
|
@ -130,8 +130,9 @@ class App.TicketZoom extends App.Controller
|
|||
if !status && !detail
|
||||
detail = 'General communication error, maybe internet is not available!'
|
||||
@html App.view('generic/error/generic')(
|
||||
status: status
|
||||
detail: detail
|
||||
status: status
|
||||
detail: detail
|
||||
objectName: 'Ticket'
|
||||
)
|
||||
|
||||
# update current task title
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="main flex">
|
||||
<h1><%- @T('Error') %></h1>
|
||||
<div class="flex fullscreenMessage">
|
||||
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, something went wrong!' ) %></h2>
|
||||
<p><%- @T('Status Code') %>: <%= @status %></p>
|
||||
<p><%= @detail %></p>
|
||||
</div>
|
|
@ -1,4 +1,3 @@
|
|||
<div class="main flex">
|
||||
<h1><%- @T('Not Found') %></h1>
|
||||
<p><%- @T('Sorry, unable to find this ressource.') %></p>
|
||||
<div class="flex fullscreenMessage">
|
||||
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, but I can\'t find this %s.', @objectName ) %></h2>
|
||||
</div>
|
|
@ -1,4 +1,3 @@
|
|||
<div class="main flex">
|
||||
<h1><%- @T('Unauthorized') %></h1>
|
||||
<p><%- @T('Sorry, you are not allowed to access this ressource.') %></p>
|
||||
<div class="flex fullscreenMessage">
|
||||
<div class="error icon"></div><h2><%- @T('Opps.. I\'m sorry, but you have insufficient rights to open this %s.', @objectName ) %></h2>
|
||||
</div>
|
Loading…
Reference in a new issue