helpdesk 0.0.41 → 0.0.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cfc2c55a43bf9bf2f2f05d1f1e258cb7547ca18
4
- data.tar.gz: f4e2d6ccf49ec0b7104c99b18c3e3d44cc69c7da
3
+ metadata.gz: dff8888556e31a2eefa08bb210d31f15459616ec
4
+ data.tar.gz: abdbd924e7bbf69ae57310a637499cf93948f7db
5
5
  SHA512:
6
- metadata.gz: 0269752df98f6ef103392b20266575013d9eaf9a7f746fbc941cb0994047b47c1af9aa5617f35e17bc9f9a024efcf28f06bf1beda438ded53594f27ab6781721
7
- data.tar.gz: 7a33f106592455d9252d1cacff64941141dd4792eef13108dfeb4ecff8d54f04a3b8042eb9d21ef1bf5412276b5f8234b7063fb7585dce0654ba8f6d6a5ed4a1
6
+ metadata.gz: 234528ecc4875bb6f8b9ab61d7794a26c968e154e8b1648a5b59dec944479710f20d7d5ed982acf67981845a48ebbd8bf50b34af1ce73e6e4610fa9abc7819f7
7
+ data.tar.gz: b75c2470071b6243739ac8b36eaee0d449377f5f7b73eecd26dc3e358e933109d9f972990b96acabfd8faf1b3efefb940893ffa79327a4de4c94d4122c73e661
@@ -41,6 +41,14 @@ module Helpdesk
41
41
  before_create :set_status
42
42
  after_create :send_email
43
43
 
44
+ def ticket_type_tr_class
45
+ ticket_type.tr_class rescue ''
46
+ end
47
+
48
+ def ticket_type_title
49
+ ticket_type.title rescue ''
50
+ end
51
+
44
52
  def set_status
45
53
  if self.status.blank?
46
54
  self.status = :new
@@ -1,6 +1,6 @@
1
1
  %table.table.table-bordered
2
2
  %tbody
3
- %tr{:class=>ticket.ticket_type.tr_class}
3
+ %tr{:class=>ticket.ticket_type_tr_class}
4
4
  %td{colspan:2}
5
5
  %h4
6
6
  ="##{ticket.subject}"
@@ -12,7 +12,7 @@
12
12
  %td{rowspan:2}
13
13
  = status_label humanize_with_i18n(ticket.status,'helpdesk.tickets.statuses'), Helpdesk::Ticket::STATUS_CLASS_BY_KEY[ticket.status.to_sym]
14
14
 
15
- = ticket.ticket_type.title
15
+ = ticket.ticket_type_title
16
16
  = auto_link(simple_format(ticket.description), :html => { :target => "_blank" })
17
17
  %tr
18
18
  %td
@@ -50,7 +50,7 @@
50
50
  %div.comment-body
51
51
  = auto_link(simple_format(comment.comment), :html => { :target => "_blank" })
52
52
 
53
- %tr{:class=>ticket.ticket_type.tr_class}
53
+ %tr{:class=>ticket.ticket_type_tr_class}
54
54
  %td{colspan:2}
55
55
  - if show_button
56
56
  = link_to 'Show', admin_ticket_url(ticket), class: 'btn btn-block'
@@ -20,11 +20,11 @@
20
20
 
21
21
  %tbody
22
22
  - @tickets.each do |ticket|
23
- %tr{:class=>ticket.ticket_type.tr_class}
23
+ %tr{:class=>ticket.ticket_type_tr_class}
24
24
  %td
25
25
  = Helpdesk::Ticket::STATUS_BY_KEY[ticket.status.to_sym]
26
26
  %td= ticket.id
27
- %td= ticket.ticket_type.title
27
+ %td= ticket.ticket_type_title
28
28
  %td= ticket.subject
29
29
  %td
30
30
  - if ticket.requester
@@ -4,7 +4,7 @@
4
4
 
5
5
  %table.table
6
6
  %tbody
7
- %tr{:class=>@ticket.ticket_type.tr_class}
7
+ %tr{:class=>@ticket.ticket_type_tr_class}
8
8
 
9
9
  %td
10
10
 
@@ -1,6 +1,6 @@
1
1
  - content_for :title do
2
2
  = t('helpdesk.mailer.ticket_created_notification.title')
3
- = @ticket.ticket_type.title
3
+ = @ticket.ticket_type_title
4
4
  %p
5
5
  = t('helpdesk.mailer.ticket_created_notification.ticket_content')
6
6
  %br
@@ -1,6 +1,6 @@
1
1
  %table.table.table-bordered
2
2
  %tbody
3
- %tr{:class=>ticket.ticket_type.tr_class}
3
+ %tr{:class=>ticket.ticket_type_tr_class}
4
4
  %td{colspan:2}
5
5
  %h4
6
6
  ="##{ticket.subject}"
@@ -11,7 +11,7 @@
11
11
  = ticket.requester.send Helpdesk.display_user.to_sym
12
12
  %td{rowspan:2}
13
13
  = status_label humanize_with_i18n(ticket.status,'helpdesk.tickets.statuses'), Helpdesk::Ticket::STATUS_CLASS_BY_KEY[ticket.status.to_sym]
14
- = ticket.ticket_type.title
14
+ = ticket.ticket_type_title
15
15
 
16
16
  = auto_link(simple_format(ticket.description), :html => { :target => "_blank" })
17
17
  %tr
@@ -48,7 +48,7 @@
48
48
  %div.comment-body
49
49
  = auto_link(simple_format(comment.comment), :html => { :target => "_blank" })
50
50
 
51
- %tr{:class=>ticket.ticket_type.tr_class}
51
+ %tr{:class=>ticket.ticket_type_tr_class}
52
52
  %td{colspan:2}
53
53
  - if show_button
54
54
  = link_to ticket.subject, ticket_url(I18n.locale,ticket), class: 'btn btn-block'
@@ -6,14 +6,14 @@
6
6
  - unless @ticket.open?
7
7
  %table.table
8
8
  %tbody
9
- %tr{:class=>@ticket.ticket_type.tr_class}
9
+ %tr{:class=>@ticket.ticket_type_tr_class}
10
10
  %td{style:'width:100px'}
11
11
  %td
12
12
  = t('helpdesk.tickets.ticket_closed')
13
13
  - if @ticket.open? || helpdesk_user == @ticket.requester
14
14
  %table.table
15
15
  %tbody
16
- %tr{:class=>@ticket.ticket_type.tr_class}
16
+ %tr{:class=>@ticket.ticket_type_tr_class}
17
17
  %td{style:'width:100px'}
18
18
  %td
19
19
  = simple_form_for(@ticket, :html => {:class => 'form-vertical' }) do |f|
@@ -1,3 +1,3 @@
1
1
  module Helpdesk
2
- VERSION = "0.0.41"
2
+ VERSION = "0.0.42"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpdesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.41
4
+ version: 0.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Beynon Wacław Łuczak