Moved to new attachment view.

This commit is contained in:
Martin Edenhofer 2014-12-28 16:28:52 +01:00
parent 8247cdbf51
commit 9f97c3af34
4 changed files with 28 additions and 20 deletions

View file

@ -1552,6 +1552,8 @@ class Article extends App.Controller
if @article_changed if @article_changed
@article['html'] = @article['html'] + '</div>' @article['html'] = @article['html'] + '</div>'
@article['html'] = @article['html'].replace( /\n/g, '<br>' )
actionRow: -> actionRow: ->
if @isRole('Customer') if @isRole('Customer')
@article.actions = [] @article.actions = []

View file

@ -196,12 +196,12 @@ Grüße, Peter</div>
<div class="article-content zIndex-1 horizontal"> <div class="article-content zIndex-1 horizontal">
<span class="avatar user-popover " data-id="3" style="background-image: url(api/v1/users/image/bb100af55234cf61fb6f207636f095f8)" data-placement="right" data-original-title="" title=""></span> <span class="avatar user-popover " data-id="3" style="background-image: url(api/v1/users/image/bb100af55234cf61fb6f207636f095f8)" data-placement="right" data-original-title="" title=""></span>
<div class="flex bubble-gap internal-border"> <div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div>Lieber HP, <div class="text-bubble"><div class="bubble-arrow"></div>Lieber HP,<br>
anbei findest du die Midi Noten für Maria Maria "I Like it Loud". anbei findest du die Midi Noten für Maria Maria "I Like it Loud".<br>
Wünsche dir einen guten Auftritt in Hamburg. Wünsche dir einen guten Auftritt in Hamburg.<br>
<br>
Alles gute, Alles gute,<br>
Oliver Oliver<br>
<div class="attachments"> <div class="attachments">
<div class="paperclip icon"></div> <div class="paperclip icon"></div>
<h3>2 <%- @T('Attached Files') %></h3> <h3>2 <%- @T('Attached Files') %></h3>

View file

@ -41,7 +41,22 @@
<% end %> <% end %>
<%- article.created_by.avatar("40", position) %> <%- article.created_by.avatar("40", position) %>
<div class="flex bubble-gap internal-border"> <div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div><%- article.html %></div> <div class="text-bubble">
<div class="bubble-arrow"></div>
<%- article.html %>
<% if !_.isEmpty( article.attachments ): %>
<div class="attachments">
<div class="paperclip icon"></div>
<h3><%- article.attachments.length %> <%- @T('Attached Files') %></h3>
<% for attachment in article.attachments: %>
<div class="attachment horizontal">
<a class="attachment-name u-highlight" href="<%= App.Config.get('api_path') %>/ticket_attachment/<%= article.ticket_id %>/<%= article.id %>/<%= attachment.id %>" target="_blank" data-type="attachment"><%= attachment.filename %></a>
<div class="attachment-size"><%= attachment.size %></div>
</div>
<% end %>
</div>
<% end %>
</div>
</div> </div>
</div> </div>
@ -59,13 +74,6 @@
</div> </div>
</div> </div>
</div> </div>
<% if article.attachments: %>
<div class="always-shown">
<% for attachment in article.attachments: %>
<a href="<%= App.Config.get('api_path') %>/ticket_attachment/<%= article.ticket_id %>/<%= article.id %>/<%= attachment.id %>" target="_blank" data-type="attachment" class="attachment" title="<%= attachment.size %>"><%= attachment.filename %></a>
<% end %>
</div>
<% end %>
<% if article.actions: %> <% if article.actions: %>
<div class="article-actions horizontal stretch"> <div class="article-actions horizontal stretch">

View file

@ -3056,7 +3056,6 @@ footer {
.text-bubble { .text-bubble {
padding: 10px 20px; padding: 10px 20px;
white-space: pre-wrap;
background: white; background: white;
border-radius: 2px; border-radius: 2px;
border: 1px solid hsl(240,4%,95%); border: 1px solid hsl(240,4%,95%);
@ -3364,7 +3363,6 @@ footer {
.ticket-edit .text-bubble { .ticket-edit .text-bubble {
border-color: #b3b3b3; border-color: #b3b3b3;
white-space: normal;
border-radius: 5px; border-radius: 5px;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;