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

This commit is contained in:
Martin Edenhofer 2015-07-15 21:46:03 +02:00
commit a09fdbd142
13 changed files with 205 additions and 99 deletions

View file

@ -37,11 +37,11 @@
<span class="separator-text"><%- @T( 'or sign in using' ) %></span>
</div>
<div class="auth_providers horizontal stretch">
<div class="auth-providers">
<% for auth_provider in @auth_providers: %>
<a class="auth_provider <%= auth_provider.class %>" href="<%= auth_provider.url %>">
<span class="<%= auth_provider.class %> provider_icon"></span>
<span class="provider_name flex"><%- @T( auth_provider.name ) %></span>
<a class="auth-provider auth-provider--<%= auth_provider.class %>" href="<%= auth_provider.url %>">
<svg class="provider-icon"><use xlink:href="#icon-<%= auth_provider.class %>-button" /></svg>
<span class="provider-name"><%- @T( auth_provider.name ) %></span>
</a>
<% end %>
</div>

View file

@ -12,13 +12,17 @@
.icon-dashboard { width: 24px; height: 24px; }
.icon-diagonal-cross { width: 13px; height: 13px; }
.icon-download { width: 14px; height: 13px; }
.icon-email-button { width: 29px; height: 22px; }
.icon-email { width: 17px; height: 17px; }
.icon-facebook-button { width: 29px; height: 22px; }
.icon-facebook { width: 17px; height: 17px; }
.icon-full-logo { width: 175px; height: 50px; }
.icon-google-button { width: 29px; height: 22px; }
.icon-group { width: 24px; height: 24px; }
.icon-help { width: 16px; height: 16px; }
.icon-important { width: 16px; height: 16px; }
.icon-in-process { width: 64px; height: 64px; }
.icon-linkedin-button { width: 29px; height: 22px; }
.icon-list { width: 16px; height: 16px; }
.icon-loading { width: 16px; height: 16px; }
.icon-lock-open { width: 16px; height: 16px; }
@ -65,5 +69,6 @@
.icon-tools { width: 24px; height: 24px; }
.icon-total-tickets { width: 48px; height: 83px; }
.icon-trash { width: 16px; height: 16px; }
.icon-twitter-button { width: 29px; height: 22px; }
.icon-twitter { width: 17px; height: 17px; }
.icon-user { width: 16px; height: 16px; }

View file

@ -1475,7 +1475,6 @@ ol.tabs li {
height: 1px;
top: 50%;
left: 0;
margin-top: -1px;
background: #e6e6e6;
}
@ -1490,76 +1489,62 @@ ol.tabs li {
position: relative;
}
.auth_provider,
.auth_provider:hover {
padding: 9px 10px 9px 7px;
color: white;
.auth-providers {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: -10px;
}
.auth-provider {
height: 40px;
padding: 0 10px 0 7px;
margin-bottom: 10px;
color: white !important;
line-height: 22px;
text-align: center;
border-radius: 4px;
display: flex;
align-items: center;
text-decoration: none;
width: calc(33.33% - 6px);
&.auth_provider--wide {
&.auth-provider--wide {
padding-right: 25px;
}
}
.auth_providers .auth_provider:not(:last-child) {
margin-right: 8px;
}
.auth_provider:hover {
color: white;
text-decoration: none;
@extend .u-clickable;
}
.auth_provider.facebook,
.btn.facebook:hover {
&.auth-provider--facebook {
background: #4f699c;
}
.auth_provider.google,
.btn.google:hover {
&.auth-provider--google {
background: #d8543c;
}
.auth_provider.twitter,
.btn.twitter:hover {
background: hsl(197, 75%, 53%);
&.auth-provider--twitter {
background: #2daee1;
}
.auth_provider.email,
.btn.email:hover {
background: hsl(47, 100%, 59%);
&.auth-provider--email {
background: #ffd22e;
}
.provider_name {
&.auth-provider--linkedin {
background: #006087;
}
.provider-name {
flex: 1;
}
.provider_icon {
width: 29px;
height: 22px;
background: image_url("/assets/images/provider.svg") no-repeat;
.provider-icon {
width: 29px;
height: 22px;
margin-right: 10px;
margin-top: 1px;
}
}
.facebook.provider_icon {
background-position: 0 0;
}
.google.provider_icon {
background-position: -30px 0;
}
.twitter.provider_icon {
background-position: -60px 0;
}
.email.provider_icon {
background-position: -90px 0;
}
/*
global icon definitions

Binary file not shown.

View file

@ -97,23 +97,32 @@ class Tweet
Rails.logger.debug group_id.inspect
if tweet.class.to_s == 'Twitter::DirectMessage'
ticket = Ticket.find_by(
customer_id: user.id,
state: Ticket::State.where.not(
state_type_id: Ticket::StateType.where(
name: 'closed',
article = Ticket::Article.find_by(
from: 'me_bauer',
type_id: Ticket::Article::Type.find_by( name: 'twitter direct-message' ).id,
)
if article
ticket = Ticket.find_by(
id: article.ticket_id,
customer_id: user.id,
state: Ticket::State.where.not(
state_type_id: Ticket::StateType.where(
name: 'closed',
)
)
)
)
return ticket if ticket
return ticket if ticket
end
end
Ticket.create(
customer_id: user.id,
title: "#{tweet.text[0, 37]}...",
group_id: group_id,
state: Ticket::State.find_by( name: 'new' ),
priority: Ticket::Priority.find_by( name: '2 normal' ),
state_id: Ticket::State.find_by( name: 'new' ).id,
priority_id: Ticket::Priority.find_by( name: '2 normal' ).id,
)
end
@ -153,8 +162,8 @@ class Tweet
message_id: tweet.id,
ticket_id: ticket.id,
in_reply_to: in_reply_to,
type: Ticket::Article::Type.find_by( name: article_type ),
sender: Ticket::Article::Sender.find_by( name: 'Customer' ),
type_id: Ticket::Article::Type.find_by( name: article_type ).id,
sender_id: Ticket::Article::Sender.find_by( name: 'Customer' ).id,
internal: false,
)
end

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="29px" height="22px" viewBox="0 0 29 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
<title>email-button</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="email-button" sketch:type="MSArtboardGroup" fill="#FFFFFF">
<path d="M25.5086484,18.3149449 C25.8146823,17.9649376 26,17.5077401 26,17.0081158 L26,5.99188419 C26,5.57003752 25.8674188,5.17881924 25.6419541,4.85677054 L14.5,14 L3.35735204,4.85620115 L3.35735204,4.85620115 C3.13207326,5.17854842 3,5.5700978 3,5.99188419 L3,17.0081158 C3,17.5078518 3.18606043,17.9646049 3.49218432,18.3143008 L3.49218432,18.3143008 L11.6549714,12 L12,12.2923145 L3.82364829,18.6171082 C4.15469946,18.8578739 4.56203526,19 5.00086422,19 L23.9991358,19 C24.439573,19 24.8467726,18.8580775 25.1772629,18.617813 L17,12.2923145 L17.3450286,12 L25.5086484,18.3149449 Z M4.00595392,4.26365716 C4.29900312,4.09596268 4.63869667,4 5.00086422,4 L23.9991358,4 C24.3601255,4 24.6998037,4.09617742 24.9932362,4.26432456 L14.5000004,12.9116819 L4.00595392,4.26365716 L4.00595392,4.26365716 Z" id="email" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="29px" height="22px" viewBox="0 0 29 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
<title>facebook-button</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#E6EAF1" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="facebook-button" sketch:type="MSArtboardGroup">
<path d="M0,17 L29,17 L29,22 L0,22 L0,17 Z" id="bar" fill="#778EBA" sketch:type="MSShapeGroup"></path>
<path d="M17.9191655,22 L17.9191655,11.9437767 L15,11.9437767 L15,7.97364464 L17.9773243,7.97364464 L17.9773243,3.93510204 C17.9773243,1.85079647 19.5752523,0 22.028952,0 L27,0 L27,3.80793996 L23.1369773,3.80793996 C22.0660533,3.80793996 21.9436541,3.84603385 21.9436541,4.84117843 L21.9356322,7.97364464 L25.4873949,7.97364464 L25.1013409,11.9437767 L21.8759692,11.9437767 L21.9768096,22 L17.9191655,22 Z" id="f" fill="url(#linearGradient-1)" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="29px" height="22px" viewBox="0 0 29 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
<title>google-button</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FAE7E3" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="google-button" sketch:type="MSArtboardGroup">
<path d="M24.0555555,8.04444444 L24.0555555,5.00000001 L22.0444444,5.00000001 L22.0444444,8.04444444 L19,8.04444444 L19,9.95555556 L22.0444444,9.95555556 L22.0444444,13 L24.0555555,13 L24.0555555,9.95555556 L27,9.95555556 L27,8.04444444 L24.0555555,8.04444444 Z" id="plus" fill="#FDF4F2" sketch:type="MSShapeGroup"></path>
<path d="M14.1171842,12.6636942 C13.5107183,12.2277942 12.350971,11.1675267 12.350971,10.5445368 C12.350971,9.81408747 12.5563825,9.45423576 13.6387952,8.595386 C14.7486142,7.71504434 15.5338993,6.4773308 15.5338993,5.03764841 C15.5338993,3.32380642 14.7819902,1.65322379 13.3709734,1.10214919 L15.4983525,1.10214919 L17,0 L10.2903438,0 C7.28216459,0 4.45117649,2.31396223 4.45117649,4.9946646 C4.45117649,7.73378087 6.50176377,9.94469215 9.5620421,9.94469215 C9.77478001,9.94469215 9.98154824,9.94028355 10.1839749,9.92540454 C9.98534713,10.3117078 9.84343141,10.7465057 9.84343141,11.1981113 C9.84343141,11.9591453 10.2466566,12.5766244 10.7565221,13.0803066 C10.3714773,13.0803066 9.99918595,13.0916036 9.59351863,13.0916036 C5.86762027,13.0916036 3,15.5011773 3,17.9997495 C3,20.4605731 6.14358259,22 9.86948095,22 C14.1171842,22 16.4632709,19.5526777 16.4632709,17.0915786 C16.4632709,15.118456 15.8899097,13.9366765 14.1171842,12.6636942 L14.1171842,12.6636942 Z M10.5104592,8.99892878 C8.87768413,8.94839543 7.32589428,7.10339638 7.04423994,4.87886531 C6.76232931,2.65353634 7.85716767,0.950562585 9.48943018,1.00109593 C11.1216927,1.05216121 12.6739951,2.83731814 12.9559057,5.06211518 C13.2373038,7.28744415 12.1424654,9.04972809 10.5104592,8.99892878 L10.5104592,8.99892878 Z M9.28402936,21 C6.79643544,21 5,19.3879579 5,17.4511994 C5,15.5530848 7.22837673,13.9729776 9.71597064,14.0003504 C10.2962607,14.006791 10.8372357,14.1023274 11.3284117,14.2652223 C12.6787524,15.2267583 13.6474751,15.7699202 13.9208457,16.8656365 C13.9722174,17.0878391 14,17.3164824 14,17.5499561 C14,19.4867146 12.7812336,21 9.28402936,21 L9.28402936,21 Z" id="g" fill="url(#linearGradient-1)" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="29px" height="22px" viewBox="0 0 29 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
<title>linkedin-button</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linkedin-button" sketch:type="MSArtboardGroup" fill="#FFFFFF">
<path d="M10.5123582,3.54161689 C10.5123582,4.64583739 9.61614808,5.54204755 8.51365023,5.54204755 C7.40770708,5.54204755 6.5140809,4.64583739 6.5140809,3.54161689 C6.5140809,2.43868838 7.40770708,1.54204755 8.51365023,1.54204755 C9.61614808,1.54204755 10.5123582,2.43868838 10.5123582,3.54161689 Z M6.99876363,7.0372951 L9.99876363,7.0372951 L9.99876363,18.0372951 L6.99876363,18.0372951 L6.99876363,7.0372951 Z M16.3014006,7.01729103 L16.3014006,8.52362272 L16.3480323,8.52362272 C16.805365,7.65687236 17.9236698,6.7426347 19.5904316,6.7426347 C23.0578608,6.7426347 23.6982978,9.02544807 23.6982978,11.9949023 L23.6982978,18.0420475 L20.275789,18.0420475 L20.275789,12.6806875 C20.275789,11.4019526 20.250548,9.75743715 18.4948009,9.75743715 C16.7116738,9.75743715 16.4395844,11.1499704 16.4395844,12.5887076 L16.4395844,18.0420475 L13.0140809,18.0420475 L13.0140809,7.01729103 L16.3014006,7.01729103 Z" id="Fill-4" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="29px" height="22px" viewBox="0 0 29 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
<title>twitter-button</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#E9F7FC" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="twitter-button" sketch:type="MSArtboardGroup" fill="url(#linearGradient-1)">
<path d="M24.1721449,4.16251918 C25.188671,3.53766761 25.9695138,2.54822003 26.3370757,1.36915194 C25.3855914,1.94785719 24.3318657,2.36795104 23.2102213,2.59436492 C22.3121358,1.61303769 21.0324498,1 19.6162028,1 C16.8969898,1 14.6922188,3.26055863 14.6922188,6.04888204 C14.6922188,6.444612 14.7357786,6.83000606 14.8197791,7.19952678 C10.7275179,6.98898768 7.09942041,4.97883517 4.67084834,1.92410889 C4.24700628,2.66979412 4.00412472,3.53705345 4.00412472,4.46239352 C4.00412472,6.21413866 4.87340963,7.75952899 6.1946151,8.6649334 C5.38749194,8.63872417 4.62824849,8.41157273 3.96440479,8.03343948 C3.96384504,8.05448004 3.96384504,8.07564401 3.96384504,8.09693282 C3.96384504,10.5431759 5.66113462,12.5837205 7.913665,13.0478671 C7.50050299,13.1632882 7.0655009,13.2249362 6.61645745,13.2249362 C6.29917659,13.2249362 5.99077618,13.1931895 5.69005415,13.1343712 C6.3166968,15.140216 8.13506611,16.5999632 10.2897968,16.6405692 C8.60462863,17.9948625 6.48157845,18.8020738 4.1745661,18.8020738 C3.7771233,18.8020738 3.38520245,18.7780786 3,18.7314416 C5.17909105,20.1641186 7.76726352,21 10.5479176,21 C19.6047223,21 24.5575069,13.3065198 24.5575069,6.63423251 C24.5575069,6.41532625 24.5527071,6.19764974 24.5432277,5.98095903 C25.5051514,5.26923458 26.3398759,4.38007085 27,3.36749057 C26.1171145,3.76912675 25.1680301,4.0404529 24.1721449,4.16251918 Z" id="twitter" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="116px" height="22px" viewBox="0 0 116 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<title>provider</title>
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
<defs>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#E9F7FC" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#E6EAF1" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#FAE7E3" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<path d="M83.1721449,4.16251918 C84.188671,3.53766761 84.9695138,2.54822003 85.3370757,1.36915194 C84.3855914,1.94785719 83.3318657,2.36795104 82.2102213,2.59436492 C81.3121358,1.61303769 80.0324498,1 78.6162028,1 C75.8969898,1 73.6922188,3.26055863 73.6922188,6.04888204 C73.6922188,6.444612 73.7357786,6.83000606 73.8197791,7.19952678 C69.7275179,6.98898768 66.0994204,4.97883517 63.6708483,1.92410889 C63.2470063,2.66979412 63.0041247,3.53705345 63.0041247,4.46239352 C63.0041247,6.21413866 63.8734096,7.75952899 65.1946151,8.6649334 C64.3874919,8.63872417 63.6282485,8.41157273 62.9644048,8.03343948 C62.963845,8.05448004 62.963845,8.07564401 62.963845,8.09693282 C62.963845,10.5431759 64.6611346,12.5837205 66.913665,13.0478671 C66.500503,13.1632882 66.0655009,13.2249362 65.6164574,13.2249362 C65.2991766,13.2249362 64.9907762,13.1931895 64.6900542,13.1343712 C65.3166968,15.140216 67.1350661,16.5999632 69.2897968,16.6405692 C67.6046286,17.9948625 65.4815784,18.8020738 63.1745661,18.8020738 C62.7771233,18.8020738 62.3852024,18.7780786 62,18.7314416 C64.179091,20.1641186 66.7672635,21 69.5479176,21 C78.6047223,21 83.5575069,13.3065198 83.5575069,6.63423251 C83.5575069,6.41532625 83.5527071,6.19764974 83.5432277,5.98095903 C84.5051514,5.26923458 85.3398759,4.38007085 86,3.36749057 C85.1171145,3.76912675 84.1680301,4.0404529 83.1721449,4.16251918 Z" id="twitter" fill="url(#linearGradient-1)" sketch:type="MSShapeGroup"></path>
<g id="facebook" sketch:type="MSLayerGroup">
<path d="M0,17 L29,17 L29,22 L0,22 L0,17 Z" id="bar" fill="#778EBA" sketch:type="MSShapeGroup"></path>
<path d="M17.9191655,22 L17.9191655,11.9437767 L15,11.9437767 L15,7.97364464 L17.9773243,7.97364464 L17.9773243,3.93510204 C17.9773243,1.85079647 19.5752523,0 22.028952,0 L27,0 L27,3.80793996 L23.1369773,3.80793996 C22.0660533,3.80793996 21.9436541,3.84603385 21.9436541,4.84117843 L21.9356322,7.97364464 L25.4873949,7.97364464 L25.1013409,11.9437767 L21.8759692,11.9437767 L21.9768096,22 L17.9191655,22 Z" id="f" fill="url(#linearGradient-2)" sketch:type="MSShapeGroup"></path>
</g>
<path d="M115.508648,18.3149449 C115.814682,17.9649376 116,17.5077401 116,17.0081158 L116,5.99188419 C116,5.57003752 115.867419,5.17881924 115.641954,4.85677054 L104.5,14 L93.357352,4.85620115 L93.357352,4.85620115 C93.1320733,5.17854842 93,5.5700978 93,5.99188419 L93,17.0081158 C93,17.5078518 93.1860604,17.9646049 93.4921843,18.3143008 L93.4921843,18.3143008 L101.654971,12 L102,12.2923145 L93.8236483,18.6171082 C94.1546995,18.8578739 94.5620353,19 95.0008642,19 L113.999136,19 C114.439573,19 114.846773,18.8580775 115.177263,18.617813 L107,12.2923145 L107.345029,12 L115.508648,18.3149449 Z M94.0059539,4.26365716 C94.2990031,4.09596268 94.6386967,4 95.0008642,4 L113.999136,4 C114.360126,4 114.699804,4.09617742 114.993236,4.26432456 L104.5,12.9116819 L94.0059539,4.26365716 L94.0059539,4.26365716 Z" id="email" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<g id="google+" sketch:type="MSLayerGroup" transform="translate(34.000000, 0.000000)">
<path d="M21.0555555,8.04444444 L21.0555555,5.00000001 L19.0444444,5.00000001 L19.0444444,8.04444444 L16,8.04444444 L16,9.95555556 L19.0444444,9.95555556 L19.0444444,13 L21.0555555,13 L21.0555555,9.95555556 L24,9.95555556 L24,8.04444444 L21.0555555,8.04444444 Z" id="plus" fill="#FDF4F2" sketch:type="MSShapeGroup"></path>
<path d="M11.1171842,12.6636942 C10.5107183,12.2277942 9.35097104,11.1675267 9.35097104,10.5445368 C9.35097104,9.81408747 9.55638253,9.45423576 10.6387952,8.595386 C11.7486142,7.71504434 12.5338993,6.4773308 12.5338993,5.03764841 C12.5338993,3.32380642 11.7819902,1.65322379 10.3709734,1.10214919 L12.4983525,1.10214919 L14,0 L7.29034384,0 C4.28216459,0 1.45117649,2.31396223 1.45117649,4.9946646 C1.45117649,7.73378087 3.50176377,9.94469215 6.5620421,9.94469215 C6.77478001,9.94469215 6.98154824,9.94028355 7.18397488,9.92540454 C6.98534713,10.3117078 6.84343141,10.7465057 6.84343141,11.1981113 C6.84343141,11.9591453 7.24665659,12.5766244 7.75652208,13.0803066 C7.3714773,13.0803066 6.99918595,13.0916036 6.59351863,13.0916036 C2.86762027,13.0916036 0,15.5011773 0,17.9997495 C0,20.4605731 3.14358259,22 6.86948095,22 C11.1171842,22 13.4632709,19.5526777 13.4632709,17.0915786 C13.4632709,15.118456 12.8899097,13.9366765 11.1171842,12.6636942 L11.1171842,12.6636942 Z M7.51045921,8.99892878 C5.87768413,8.94839543 4.32589428,7.10339638 4.04423994,4.87886531 C3.76232931,2.65353634 4.85716767,0.950562585 6.48943018,1.00109593 C8.1216927,1.05216121 9.67399511,2.83731814 9.95590574,5.06211518 C10.2373038,7.28744415 9.14246545,9.04972809 7.51045921,8.99892878 L7.51045921,8.99892878 Z M6.28402936,21 C3.79643544,21 2,19.3879579 2,17.4511994 C2,15.5530848 4.22837673,13.9729776 6.71597064,14.0003504 C7.2962607,14.006791 7.83723572,14.1023274 8.32841167,14.2652223 C9.6787524,15.2267583 10.6474751,15.7699202 10.9208457,16.8656365 C10.9722174,17.0878391 11,17.3164824 11,17.5499561 C11,19.4867146 9.78123362,21 6.28402936,21 L6.28402936,21 Z" id="g" fill="url(#linearGradient-3)" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

View file

@ -220,25 +220,86 @@ class TwitterTest < ActiveSupport::TestCase
sleep 5
}
assert( article, 'inbound article created' )
assert( article, "inbound article '#{text}' created" )
ticket = article.ticket
assert( ticket, 'ticket of inbound article exists' )
assert( ticket.articles, 'ticket.articles exists' )
assert_equal( ticket.articles.count, 1, 'ticket article inbound count' )
assert_equal( 1, ticket.articles.count, 'ticket article inbound count' )
assert_equal( ticket.state.name, 'new' )
# reply via ticket
outbound_article = Ticket::Article.create(
ticket_id: ticket.id,
to: 'me_bauer',
body: text,
body: 'Will call you later!',
type: Ticket::Article::Type.find_by( name: 'twitter direct-message' ),
sender: Ticket::Article::Sender.find_by( name: 'Agent' ),
internal: false,
updated_by_id: 1,
created_by_id: 1,
)
ticket.state = Ticket::State.find_by( name: 'pending reminder' )
ticket.save
assert( outbound_article, 'outbound article created' )
assert_equal( outbound_article.ticket.articles.count, 2, 'ticket article outbound count' )
assert_equal( 2, outbound_article.ticket.articles.count, 'ticket article outbound count' )
text = 'Ok. ' + hash
dm = client.create_direct_message(
'armin_theo',
text,
)
assert( dm, "second dm with ##{hash} created" )
# fetch check system account
article = nil
(1..4).each {
Channel.fetch
# check if ticket and article has been created
article = Ticket::Article.find_by( message_id: dm.id )
break if article
sleep 5
}
assert( article, "inbound article '#{text}' created" )
ticket = article.ticket
assert( ticket, 'ticket of inbound article exists' )
assert( ticket.articles, 'ticket.articles exists' )
assert_equal( 3, ticket.articles.count, 'ticket article inbound count' )
assert_equal( ticket.state.name, 'open' )
# close dm ticket, next dm should open a new
ticket.state = Ticket::State.find_by( name: 'closed' )
ticket.save
text = 'Thanks for your call . I just have one question. ' + hash
dm = client.create_direct_message(
'armin_theo',
text,
)
assert( dm, "third dm with ##{hash} created" )
# fetch check system account
article = nil
(1..4).each {
Channel.fetch
# check if ticket and article has been created
article = Ticket::Article.find_by( message_id: dm.id )
break if article
sleep 5
}
assert( article, "inbound article '#{text}' created" )
ticket = article.ticket
assert( ticket, 'ticket of inbound article exists' )
assert( ticket.articles, 'ticket.articles exists' )
assert_equal( 1, ticket.articles.count, 'ticket article inbound count' )
assert_equal( ticket.state.name, 'new' )
end
end