Merge branch 'interface' of github.com:martini/zammad into interface

This commit is contained in:
Felix Niklas 2014-07-20 23:26:39 +02:00
commit 9c0684a5dc
12 changed files with 79 additions and 70 deletions

View file

@ -20,21 +20,25 @@ class Index extends App.ControllerContent
url: '/auth/facebook',
name: 'Facebook',
config: 'auth_facebook',
class: 'facebook',
},
twitter: {
url: '/auth/twitter',
name: 'Twitter',
config: 'auth_twitter',
class: 'twitter',
},
linkedin: {
url: '/auth/linkedin',
name: 'LinkedIn',
config: 'auth_linkedin',
class: 'linkedin',
},
google_oauth2: {
url: '/auth/google_oauth2',
name: 'Google',
config: 'auth_google_oauth2',
class: 'google',
},
}
auth_providers = []

View file

@ -155,6 +155,7 @@ class App.Navigation extends App.Controller
display: "#{user.displayName()}"
id: user.id
class: "user user-popover"
url: user.uiUrl()
iconClass: "user"
area.result.push data
else if area.name is 'Organization'

View file

@ -1,10 +1,8 @@
class Index extends App.ControllerContent
className: 'reset_password fit'
events:
'submit form': 'submit'
'click .submit': 'submit'
'click .retry': 'rerender'
'click .retry': 'retry'
constructor: ->
super
@ -28,14 +26,14 @@ class Index extends App.ControllerContent
@html App.view('password/reset')(params)
@form = new App.ControllerForm(
el: @el.find('#form-password-item')
el: @el.find('.form-password-item')
model: { configure_attributes: configure_attributes }
autofocus: true
)
rerender: (e) ->
retry: (e) ->
e.preventDefault()
@el.find('#form-password').show()
@render()
submit: (e) ->
e.preventDefault()
@ -55,20 +53,17 @@ class Index extends App.ControllerContent
success: (data, status, xhr) =>
@render( sent: true )
@el.find('#form-password').hide()
error: (data, status, xhr) =>
@notify(
type: 'error'
msg: App.i18n.translateContent( 'Username or email address invalid, please try again.' )
)
@formEnable( @el.find('#form-password') )
@formEnable( @el.find('.form-password') )
App.Config.set( 'reset_password', Index, 'Routes' )
class Verify extends App.ControllerContent
className: 'container'
events:
'submit form': 'submit'
'click .submit': 'submit'

View file

@ -1,6 +1,4 @@
class Index extends App.ControllerContent
className: 'signup fit'
events:
'submit form': 'submit'
'click .submit': 'submit'

View file

@ -33,13 +33,14 @@ class App.TicketZoom extends App.Controller
meta: =>
meta =
url: @url()
id: @ticket_id
url: @url()
id: @ticket_id
iconClass: "priority"
if @ticket
@ticket = App.Ticket.retrieve( @ticket.id )
meta.head = @ticket.title
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
meta.class = "level-#{@ticket.priority_id}"
@ticket = App.Ticket.retrieve( @ticket.id )
meta.head = @ticket.title
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
meta.class = "level-#{@ticket.priority_id}"
meta
url: =>

View file

@ -15,7 +15,9 @@ class App.UserZoom extends App.Controller
meta =
url: @url()
id: @user_id
class: "level-1"
class: ""
iconClass: "user"
if @user
meta.head = @user.displayName()

View file

@ -18,31 +18,23 @@
<button class="btn btn-primary" type="submit"><%- @T( 'Sign in' ) %></button>
<% if @C('user_lost_password'): %>
<a href="#reset_password" class="subtle-link standalone pull-right"><%- @T( 'Forgot password?' ) %></a>
<a href="#reset_password" class="subtle-link standalone pull-right"><%- @T( 'Forgot password?' ) %></a>
<% end %>
</div>
<% if true or !_.isEmpty( @auth_providers ): %>
<% if !_.isEmpty( @auth_providers ): %>
<div class="separator">
<span class="separator-text"><%- @T( 'or sign in using' ) %></span>
</div>
<div class="auth_providers horizontal stretch">
<!--<% for auth_provider in @auth_providers: %>
<li><a href="<%= auth_provider.url %>"><%- @T( auth_provider.name ) %></a></li>
<% end %>-->
<a class="auth_provider facebook horizontal">
<span class="provider_icon"></span>
<span class="provider_name flex">Facebook</span>
</a>
<a class="auth_provider google horizontal">
<span class="provider_icon"></span>
<span class="provider_name flex">Google+</span>
</a>
<a class="auth_provider twitter horizontal">
<span class="provider_icon"></span>
<span class="provider_name flex">Twitter</span>
</a>
<% for auth_provider in @auth_providers: %>
<a class="auth_provider <%= auth_provider.class %> horizontal" href="<%= auth_provider.url %>">
<span class="provider_icon"></span>
<span class="provider_name flex"><%- @T( auth_provider.name ) %></span>
</a>
<li><a href="<%= auth_provider.url %>"></a></li>
<% end %>
</div>
<% end %>
</form>
@ -50,14 +42,15 @@
<p>
<%- @T( "You're already registered with your email adress if you've been in touch with our support team.") %><br>
<%- @T( "You can request your password") %> <a href="#"><%- @T( "here") %></a>.
<% if @C('user_lost_password'): %>
<%- @T( "You can request your password") %> <a href="#reset_password"><%- @T( "here") %></a>.
<% end %>
</p>
<% if @C('user_create_account'): %>
<hr>
<p>
<a href="#signup"><%- @T( 'Register as a new customer' ) %></a>
</p>
<hr>
<p>
<a href="#signup"><%- @T( 'Register as a new customer' ) %></a>
</p>
<% end %>
</div>

View file

@ -1,18 +1,18 @@
<div class="fullHeight vertical center justified">
<div class="fullHeight vertical center justified reset_password fit">
<div class="hero-unit">
<% if @sent: %>
<h2><%- @T('We\'ve sent password reset instructions to your email address.') %><small></small></h2>
<p><%- @T('If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try resending your request.') %></p>
<a href="#" class="subtle retry">&raquo; <%- @T('again') %> &laquo;</a>
<% end %>
<div id="form-password">
<% else: %>
<h2><%- @T( 'Forgot your password?' ) %><small></small></h2>
<form id="form-password-item">
<form class="form-password">
<div class="form-password-item"></div>
<div class="form-controls">
<a class="subtle-link standalone pull-left cancel" href="#/"><%- @T( 'Cancel & Go Back' ) %></a>
<button class="btn btn-primary submit pull-right"><%- @T( 'Submit' ) %></button>
</div>
</form>
</div>
<% end %>
</div>
</div>

View file

@ -1,4 +1,4 @@
<div class="fullHeight vertical center justified">
<div class="fullHeight vertical center justified reset_password fit">
<div class="hero-unit">
<h2><%- @T( 'Choose your new password.' ) %><small></small></h2>
<form id="form-password-change">

View file

@ -1,20 +1,35 @@
<table style="width: 100%;">
<tr>
<td>#<%- @P( @ticket.number ) %></td>
<td><%- @P( @ticket.humanTime ) %></td>
</tr>
<tr>
<td><%- @P( @ticket.group ) %></td>
<td><%- @T( @ticket.state.name ) %></td>
</tr>
<tr>
<td><%- @T( @ticket.priority.name ) %></td>
<td></td>
</tr>
<tr>
<td colspan="2"><%- @P( @ticket.owner ) %></td>
</tr>
<tr>
<td colspan="2"><%- @P( @ticket.customer ) %></td>
</tr>
</table>
<div class="level-2">
<div class="priority icon"></div>
eskalierend
</div>
<hr>
<h3>Personen</h3>
<div class="person">
<%- @P( @ticket.owner ) %>
</div>
<div class="person">
<%- @P( @ticket.customer ) %>
</div>
<hr>
<div class="horizontal two-columns wrap">
<div class="column">
<h3>#</h3>
<div class="contain-text"><%- @P( @ticket.number ) %></div>
</div>
<div class="column">
<h3><%- @T( 'State' ) %></h3>
<div class="contain-text"><%- @P( @ticket.state.name ) %></div>
</div>
<div class="column">
<h3><%- @T( 'Priority' ) %></h3>
<div class="contain-text"><%- @T( @ticket.priority.name ) %></div>
</div>
<div class="column">
<h3><%- @T( 'Age' ) %></h3>
<div class="contain-text"><%- @P( @ticket.humanTime ) %></div>
</div>
<div class="column">
<h3><%- @T( 'Group' ) %></h3>
<div class="contain-text"><%- @P( @ticket.group ) %></div>
</div>
</div>

View file

@ -1,4 +1,4 @@
<div class="fullHeight vertical center justified">
<div class="fullHeight vertical center justified signup fit">
<div class="hero-unit">
<h1><%- @T( 'Join' ) %> <%= @C( 'product_name' ) %></h1>
<form>

View file

@ -1,7 +1,7 @@
<% for item in @item_list: %>
<a href="<%- item.data.url %>" title="<%= item.data.title %>" class="task <%= item.data.class %> horizontal center <% if item.task.active: %>active<% end %>" data-key="<%- item.task.key %>">
<div class="icon-holder centered">
<div class="priority icon<% if item.task.notify: %> modified<% end %>"></div>
<div class="<%= item.data.iconClass %> icon<% if item.task.notify: %> modified<% end %>"></div>
</div>
<div class="name contain-text flex"><%= item.data.head %></div>
<div class="close-task button horizontal centered">