helpdesk 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/helpdesk/admin/tickets.js +1 -13
  3. data/app/assets/javascripts/helpdesk/application.js +0 -1
  4. data/app/assets/stylesheets/helpdesk/admin.css +0 -2
  5. data/app/assets/stylesheets/helpdesk/imports.css.scss +34 -0
  6. data/app/controllers/helpdesk/admin/base_controller.rb +2 -2
  7. data/app/controllers/helpdesk/admin/faqs_controller.rb +2 -7
  8. data/app/controllers/helpdesk/admin/subscribers_controller.rb +2 -8
  9. data/app/controllers/helpdesk/admin/ticket_types_controller.rb +3 -9
  10. data/app/controllers/helpdesk/admin/tickets_controller.rb +9 -21
  11. data/app/controllers/helpdesk/application_controller.rb +9 -4
  12. data/app/controllers/helpdesk/dashboard_controller.rb +2 -2
  13. data/app/controllers/helpdesk/faqs_controller.rb +80 -2
  14. data/app/controllers/helpdesk/subscribers_controller.rb +41 -18
  15. data/app/controllers/helpdesk/tickets_controller.rb +15 -20
  16. data/app/helpers/helpdesk/admin/tickets_helper.rb +0 -9
  17. data/app/helpers/helpdesk/helpdesk_helper.rb +6 -30
  18. data/app/helpers/helpdesk/tickets_helper.rb +0 -3
  19. data/app/mailers/helpdesk/comment_by_requester_confirmation +38 -0
  20. data/app/mailers/helpdesk/notifications_mailer.rb +1 -2
  21. data/app/models/helpdesk/comment.rb +5 -11
  22. data/app/models/helpdesk/faq.rb +1 -1
  23. data/app/models/helpdesk/ticket.rb +24 -27
  24. data/app/models/helpdesk/ticket_type.rb +4 -4
  25. data/app/views/helpdesk/admin/faqs/_form.html.haml +2 -2
  26. data/app/views/helpdesk/admin/faqs/edit.html.haml +9 -6
  27. data/app/views/helpdesk/admin/faqs/index.html.haml +2 -2
  28. data/app/views/helpdesk/admin/faqs/new.html.haml +1 -2
  29. data/app/views/helpdesk/admin/faqs/show.html.haml +1 -1
  30. data/app/views/helpdesk/admin/subscribers/edit.html.haml +1 -2
  31. data/app/views/helpdesk/admin/subscribers/index.html.haml +2 -3
  32. data/app/views/helpdesk/admin/subscribers/new.html.haml +1 -2
  33. data/app/views/helpdesk/admin/ticket_types/edit.html.haml +1 -2
  34. data/app/views/helpdesk/admin/ticket_types/index.html.haml +1 -1
  35. data/app/views/helpdesk/admin/ticket_types/new.html.haml +1 -2
  36. data/app/views/helpdesk/admin/tickets/_form.html.haml +9 -9
  37. data/app/views/helpdesk/admin/tickets/_ticket.html.haml +16 -15
  38. data/app/views/helpdesk/admin/tickets/edit.html.haml +5 -5
  39. data/app/views/helpdesk/admin/tickets/index.html.haml +5 -7
  40. data/app/views/helpdesk/admin/tickets/list.html.haml +2 -3
  41. data/app/views/helpdesk/admin/tickets/new.html.haml +2 -2
  42. data/app/views/helpdesk/admin/tickets/show.html.haml +9 -9
  43. data/app/views/helpdesk/faqs/_form.html.erb +33 -0
  44. data/app/views/helpdesk/faqs/edit.html.erb +6 -0
  45. data/app/views/helpdesk/faqs/index.html.erb +29 -0
  46. data/app/views/helpdesk/faqs/new.html.erb +5 -0
  47. data/app/views/helpdesk/faqs/show.html.erb +25 -0
  48. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.pl.html.haml +32 -0
  49. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.pl.html.haml +28 -0
  50. data/app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.pl.html.haml +32 -0
  51. data/app/views/helpdesk/notifications_mailer/comment_by_requester_notification.pl.html.haml +42 -0
  52. data/app/views/helpdesk/notifications_mailer/ticket_created_confirmation.pl.html.haml +34 -0
  53. data/app/views/helpdesk/notifications_mailer/ticket_created_notification.pl.html.haml +42 -0
  54. data/app/views/helpdesk/tickets/_form.html.haml +11 -11
  55. data/app/views/helpdesk/tickets/_ticket.html.haml +10 -10
  56. data/app/views/helpdesk/tickets/index.html.haml +2 -3
  57. data/app/views/helpdesk/tickets/new.html.haml +2 -2
  58. data/app/views/helpdesk/tickets/show.html.haml +12 -16
  59. data/app/views/layouts/helpdesk/_topmenu.html.haml +21 -27
  60. data/app/views/layouts/helpdesk/_topuser.html.haml +9 -32
  61. data/app/views/layouts/helpdesk/admin.html.haml +6 -14
  62. data/app/views/layouts/helpdesk/user.html.haml +6 -14
  63. data/config/initializers/simple_form.rb +144 -85
  64. data/config/locales/helpdesk.en.yml +3 -107
  65. data/config/locales/helpdesk.pl.yml +7 -46
  66. data/config/routes.rb +5 -6
  67. data/db/migrate/20130521105605_create_helpdesk_ticket_types.rb +1 -21
  68. data/db/migrate/20130521132216_add_tr_class_to_ticket_type.rb +5 -0
  69. data/lib/generators/helpdesk/install_generator.rb +0 -11
  70. data/lib/generators/helpdesk/templates/README +9 -17
  71. data/lib/generators/helpdesk/templates/helpdesk.rb +6 -9
  72. data/lib/helpdesk.rb +4 -4
  73. data/lib/helpdesk/engine.rb +0 -8
  74. data/lib/helpdesk/version.rb +1 -1
  75. metadata +28 -137
  76. data/app/assets/stylesheets/helpdesk/imports.css.sass +0 -0
  77. data/app/views/helpdesk/faqs/index.html.haml +0 -20
  78. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.html.haml +0 -15
  79. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.html.haml +0 -19
  80. data/app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.html.haml +0 -16
  81. data/app/views/helpdesk/notifications_mailer/comment_by_requester_notification.html.haml +0 -27
  82. data/app/views/helpdesk/notifications_mailer/ticket_created_confirmation.html.haml +0 -16
  83. data/app/views/helpdesk/notifications_mailer/ticket_created_notification.html.haml +0 -21
  84. data/app/views/layouts/mailer_layout.html.haml +0 -20
  85. data/config/initializers/globalize.rb +0 -4
@@ -1,16 +1,13 @@
1
1
  module Helpdesk
2
- class TicketsController < Helpdesk::ApplicationController
3
-
4
- helper TicketsHelper
5
-
2
+ class TicketsController < ApplicationController
6
3
  # GET /tickets
7
4
  # GET /tickets.json
8
5
  def index
9
6
  if params[:tickets] == 'closed'
10
- @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).closed.page(params[:page])
7
+ @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).closed
11
8
  @tickets_count = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.count
12
9
  else
13
- @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.page(params[:page])
10
+ @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active
14
11
  @tickets_count = @tickets.size
15
12
  end
16
13
 
@@ -25,7 +22,7 @@ module Helpdesk
25
22
  # GET /tickets/1.json
26
23
  def show
27
24
  @tickets_count = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.count
28
- @ticket = Helpdesk::Ticket.find(params[:id])
25
+ @ticket = Ticket.find(params[:id])
29
26
 
30
27
  respond_to do |format|
31
28
  format.html # show.html.erb
@@ -37,7 +34,7 @@ module Helpdesk
37
34
  # GET /tickets/new.json
38
35
  def new
39
36
  @tickets_count = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.count
40
- @ticket = Helpdesk::Ticket.new
37
+ @ticket = Ticket.new
41
38
  @ticket.status = Helpdesk::Ticket::STATUSES[0][0]
42
39
 
43
40
  respond_to do |format|
@@ -46,8 +43,15 @@ module Helpdesk
46
43
  end
47
44
  end
48
45
 
46
+ # GET /tickets/1/edit
47
+ def edit
48
+ @ticket = Ticket.find(params[:id])
49
+ end
50
+
51
+ # POST /tickets
52
+ # POST /tickets.json
49
53
  def create
50
- @ticket = Helpdesk::Ticket.new(ticket_params)
54
+ @ticket = Ticket.new(params[:ticket])
51
55
  @ticket.requester = helpdesk_user
52
56
  @ticket.status = Helpdesk::Ticket::STATUSES[0][0]
53
57
 
@@ -65,12 +69,10 @@ module Helpdesk
65
69
  # PUT /tickets/1
66
70
  # PUT /tickets/1.json
67
71
  def update
68
- @ticket = Helpdesk::Ticket.find(params[:id])
72
+ @ticket = Ticket.find(params[:id])
69
73
 
70
74
  respond_to do |format|
71
- if @ticket.update_attributes(ticket_params)
72
- puts ticket_params
73
- puts paramsp
75
+ if @ticket.update_attributes(params[:ticket])
74
76
  format.html { redirect_to @ticket, notice: 'Ticket was successfully updated.' }
75
77
  format.json { head :no_content }
76
78
  else
@@ -80,12 +82,5 @@ module Helpdesk
80
82
  end
81
83
  end
82
84
 
83
-
84
- private
85
-
86
- def ticket_params
87
- params.require(:ticket).permit( :ticket_type_id, :subject, :description,comments_attributes:[:author_id, :comment, :public])
88
- end
89
-
90
85
  end
91
86
  end
@@ -1,13 +1,4 @@
1
1
  module Helpdesk
2
2
  module Admin::TicketsHelper
3
- def humanize_with_i18n(string, scope = [])
4
- I18n.t string, scope: scope, default: string.humanize
5
- end
6
-
7
- # The method prefix tells me that this should be in an object
8
- # But it doesn't belong in our model, does it?
9
- def tickets_statuses_for_select
10
- Helpdesk::Ticket::STATUSES.map { |s| [humanize_with_i18n(s[0].to_s,'helpdesk.tickets.statuses'),s[0]] }
11
- end
12
3
  end
13
4
  end
@@ -1,35 +1,15 @@
1
1
  module Helpdesk
2
2
  module HelpdeskHelper
3
-
4
-
5
3
  def menu_left(title,&block)
6
- panel_menu(title,'default',&block)
7
- end
8
-
9
-
10
- def panel_menu(title,type,&block)
11
- content_tag(:div,class: "panel panel-#{type}") do
12
- content_tag(:div ,class: 'panel-heading') do
13
- content_tag(:h3 ,title,class:'panel-title')
14
- end +
15
- content_tag( :ul, class: 'nav nav-pills nav-stacked ') do
4
+ content_tag(:fieldset) do
5
+ content_tag(:legend ,title) +
6
+ content_tag( :ul, class: 'nav nav-list') do
16
7
  capture(&block)
17
- end
18
- end
19
- end
20
-
21
8
 
22
- def panel(title,type,&block)
23
- content_tag(:div,class: "panel panel-#{type}") do
24
- content_tag(:div ,class: 'panel-heading') do
25
- content_tag(:h3 ,title,class:'panel-title')
26
- end +
27
- content_tag( :div, class: 'panel-body') do
28
- capture(&block)
29
9
  end
30
10
  end
31
11
  end
32
-
12
+
33
13
 
34
14
  def menu_li(lbl, path, *args)
35
15
  options = args.extract_options!
@@ -43,12 +23,8 @@ module Helpdesk
43
23
  end
44
24
  end
45
25
 
46
- def badge(num,css='pull-right')
47
- raw("<span class=\"badge #{css}\">#{num}</span> ")
48
- end
49
-
50
- def ico(name)
51
- raw("<i class=\"glyphicon glyphicon-#{name}\"></i> ")
26
+ def ico(name,color='black')
27
+ raw("<i class=\"icon-#{name} icon-#{color}\"></i> ")
52
28
  end
53
29
 
54
30
  def parent_layout(layout)
@@ -1,7 +1,4 @@
1
1
  module Helpdesk
2
2
  module TicketsHelper
3
-
4
-
5
-
6
3
  end
7
4
  end
@@ -0,0 +1,38 @@
1
+ !!!
2
+ %html
3
+ %body
4
+ %div
5
+ %h1
6
+ Pojawił się nowy komentarz do zgłoszenie:
7
+ = @comment.ticket.ticket_type.title
8
+ %div.content
9
+ %p
10
+ Treść wysłana:
11
+ %br
12
+ = simple_format(@comment.comment)
13
+ %br
14
+ %br
15
+ %p
16
+ Zgłaszający:
17
+ %br
18
+ = @comment.author.send Helpdesk.display_user.to_sym
19
+ = @comment.author.email
20
+ %br
21
+ %br
22
+ %p
23
+ Życzymy miłego dnia!
24
+ %br
25
+ = Helpdesk.site_name
26
+ %br
27
+ %a{:href=>Helpdesk.site_address}
28
+ = Helpdesk.site_address
29
+ %div
30
+ Ta wiadomość została wygenrowana automatycznie. Nie odpowiadaj na nią. Jeśli nie zainicjowałeś akcji wysyłania tej wiadomości zgłoś to nam
31
+ %a{:href=>root_url}
32
+ klikając tutaj.
33
+
34
+
35
+
36
+
37
+
38
+
@@ -1,7 +1,5 @@
1
1
  class Helpdesk::NotificationsMailer < ActionMailer::Base
2
2
 
3
- layout 'mailer_layout'
4
-
5
3
  def ticket_created_notification(ticket)
6
4
  @ticket = ticket
7
5
  mail(:subject=>"#{Helpdesk.helpdesk_name} | #{ticket.subject}",
@@ -14,6 +12,7 @@ class Helpdesk::NotificationsMailer < ActionMailer::Base
14
12
  :to => ticket.requester.email)
15
13
  end
16
14
 
15
+
17
16
  def comment_by_requester_notification(comment)
18
17
  @comment = comment
19
18
  mail(:subject=>"#{Helpdesk.helpdesk_name} | #{comment.ticket.subject}",
@@ -1,28 +1,22 @@
1
1
  module Helpdesk
2
2
  class Comment < ActiveRecord::Base
3
+ attr_accessible :author_id, :comment, :public, :ticket_id
3
4
  belongs_to :author, :class_name => Helpdesk.user_class.to_s
4
5
  belongs_to :ticket
5
6
 
6
- default_scope -> {includes(:author).order('id ASC')}
7
- scope :pub, -> { where(:public, true)}
7
+ default_scope includes(:author).order('id ASC')
8
+ scope :pub, where('public = ?',true)
8
9
 
9
10
  after_create :send_email
10
- after_create :check_reopen
11
-
12
- def check_reopen
13
- if ticket.requester == author
14
- ticket.update_column(:status ,:waiting)
15
- end
16
- end
17
11
 
18
12
 
19
13
  def send_email
20
14
  if self.public?
21
15
  if ticket.requester == author
22
- Helpdesk::NotificationsMailer.comment_by_requester_notification(self).deliver if ticket.requester
16
+ Helpdesk::NotificationsMailer.comment_by_requester_notification(self).deliver
23
17
  Helpdesk::NotificationsMailer.comment_by_requester_confirmation(self).deliver if Helpdesk.send_confirmation_emails
24
18
  else
25
- Helpdesk::NotificationsMailer.comment_by_helpdesk_notification(self).deliver if ticket.requester
19
+ Helpdesk::NotificationsMailer.comment_by_helpdesk_notification(self).deliver
26
20
  Helpdesk::NotificationsMailer.comment_by_helpdesk_confirmation(self).deliver if Helpdesk.send_confirmation_emails
27
21
  end
28
22
  end
@@ -2,7 +2,7 @@ module Helpdesk
2
2
  class Faq < ActiveRecord::Base
3
3
  translates :title, :text
4
4
  accepts_nested_attributes_for :translations
5
- #attr_accessible :active, :position, :text, :title,:translations_attributes
5
+ attr_accessible :active, :position, :text, :title,:translations_attributes
6
6
 
7
7
  default_scope order('position ASC').includes(:translations)
8
8
 
@@ -2,34 +2,41 @@ module Helpdesk
2
2
  class Ticket < ActiveRecord::Base
3
3
 
4
4
  STATUSES = [
5
- [ :new, 'label-primary',3],
6
- [ :open, 'label-warning',2],
7
- [ :waiting, 'label-info',2],
8
- [ :solved, 'label-success',0],
9
- [ :not_fixable, 'label-default',-1],
10
- [ :unreachable, 'label-default',-1],
11
- [ :bug, 'label-default',-1]
5
+ [ :new, 'Nowe:', 'label-important',3],
6
+ [ :open, 'Otworzone:', 'label-warning',2],
7
+ [ :waiting, 'Otworzone: oczekujące', 'label-info',2],
8
+ [ :solved, 'Zamknięte: problem rozwiązany','label-success',0],
9
+ [ :not_fixable, 'Zamknięte: nienaprawialne','label-inverse',-1],
10
+ [ :unreachable, 'Zamknięte: klient nieosiągalny','label-inverse',-1],
11
+ [ :bug, 'Zamknięte: Przeniesione do bug tracker\'a','label-inverse',-1]
12
12
  ]
13
+ STATUS_OPTIONS = STATUSES.map { |i| [i[1], i[0]] }
13
14
  STATUS_BY_KEY = Hash[*STATUSES.map { |i| [i[0], i[1]] }.flatten]
14
- STATUS_CLASS_BY_KEY= Hash[*STATUSES.map { |i| [i[0], i[1]] }.flatten]
15
- STATUS_STATUS_BY_KEY= Hash[*STATUSES.map { |i| [i[0], i[2]] }.flatten]
16
- OPEN_STATUSES_KEYS = STATUSES.map { |i| (i[2]>0 ? i[0] : nil)}.compact
15
+ STATUS_CLASS_BY_KEY= Hash[*STATUSES.map { |i| [i[0], i[2]] }.flatten]
16
+ STATUS_STATUS_BY_KEY= Hash[*STATUSES.map { |i| [i[0], i[3]] }.flatten]
17
+ OPEN_STATUSES_KEYS = STATUSES.map { |i| (i[3]>0 ? i[0] : nil)}.compact
18
+
19
+ attr_accessible :subject, :description
20
+ attr_accessible :requester_id, :assignee_id, :status, :comments_attributes,:ticket_type_id
21
+
22
+
17
23
 
18
24
 
19
25
  belongs_to :requester, :class_name => Helpdesk.user_class.to_s
20
26
  belongs_to :assignee, :class_name => Helpdesk.user_class.to_s
21
27
  belongs_to :ticket_type, :class_name => Helpdesk::TicketType
22
- has_many :comments, -> {order("created_at DESC")},:dependent => :destroy
28
+ has_many :comments, :order => "created_at DESC"
23
29
 
24
30
 
25
- scope :active, -> {where('status IN (?) ',OPEN_STATUSES_KEYS)}
26
- scope :unassigned, -> {where('status IN (?) ',OPEN_STATUSES_KEYS).where('assignee_id is null')}
27
- scope :closed, -> { where('status NOT IN (?)',OPEN_STATUSES_KEYS)}
28
- default_scope -> { includes(:comments=>[:author])
31
+
32
+ scope :active, where('status IN (?) ',OPEN_STATUSES_KEYS)
33
+ scope :unassigned, where('status IN (?) ',OPEN_STATUSES_KEYS).where('assignee_id is null')
34
+ scope :closed, where('status NOT IN (?)',OPEN_STATUSES_KEYS)
35
+ default_scope includes(:comments=>[:author])
29
36
  .includes(:requester)
30
37
  .includes(:assignee)
31
38
  .includes(:ticket_type)
32
- .order('id DESC')}
39
+ .order('id DESC')
33
40
 
34
41
  validates_presence_of :description,:requester_id,:ticket_type_id
35
42
 
@@ -37,15 +44,8 @@ module Helpdesk
37
44
 
38
45
 
39
46
  before_create :set_subject
40
- before_create :set_status
41
47
  after_create :send_email
42
48
 
43
- def set_status
44
- if self.status.blank?
45
- self.status = :new
46
- end
47
- end
48
-
49
49
  def set_subject
50
50
  if self.created_at.nil?
51
51
  time = Time.now
@@ -55,7 +55,7 @@ module Helpdesk
55
55
 
56
56
  new_subject = "#{sprintf '%02d',time.year-2000}#{sprintf '%02d',time.month}#{sprintf '%02d',time.day}"
57
57
 
58
- day_num = Helpdesk::Ticket.where(created_at: Date.today.beginning_of_day..Date.today.end_of_day).count+1
58
+ day_num = Sugestion.where(created_at: Date.today.beginning_of_day..Date.today.end_of_day).count+1
59
59
  new_subject += "-#{sprintf '%04d',day_num}: "
60
60
  self.subject = new_subject + subject.to_s
61
61
  self.subject.strip!
@@ -78,8 +78,5 @@ module Helpdesk
78
78
  end
79
79
  end
80
80
 
81
-
82
-
83
-
84
81
  end
85
82
  end
@@ -2,12 +2,12 @@ module Helpdesk
2
2
  class TicketType < ActiveRecord::Base
3
3
  translates :title
4
4
  accepts_nested_attributes_for :translations
5
- #attr_accessible :active, :position,:title,:translations_attributes,:tr_class
5
+ attr_accessible :active, :position,:title,:translations_attributes,:tr_class
6
6
 
7
- default_scope ->{order('position ASC')}
7
+ default_scope order('position ASC')
8
8
 
9
- scope :active, -> {where(:active, true)}
10
- scope :inactive, -> {where(:active, false)}
9
+ scope :active, where('active = ? ', true)
10
+ scope :inactive, where('active = ? ', false)
11
11
 
12
12
  end
13
13
  end
@@ -7,14 +7,14 @@
7
7
  %li= msg
8
8
  = f.input :active
9
9
 
10
-
10
+
11
11
 
12
12
  - I18n.available_locales.each do |locale|
13
13
  %h1
14
14
  = locale
15
15
  = f.globalize_fields_for locale do |g|
16
16
  = g.input :title
17
- = g.input :text, :as => :ckeditor, :input_html => { :ckeditor => {:width=>'100%',:height => 200,:toolbar => 'Full'} }
17
+ = g.input :text, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} }
18
18
 
19
19
 
20
20
  = f.submit 'Save', :class=>'btn btn-primary'
@@ -1,11 +1,14 @@
1
1
  = render 'menu'
2
2
 
3
+ .row
4
+ .span3
5
+ %br
6
+ .span11
3
7
 
4
- - content_for :title do
5
- Edycja pytania
8
+ %h1 Edycja pytania
6
9
 
7
- = render 'form'
10
+ = render 'form'
8
11
 
9
- = link_to 'Show', [:admin,@faq]
10
- \|
11
- = link_to 'Back', admin_faqs_path
12
+ = link_to 'Show', [:admin,@faq]
13
+ \|
14
+ = link_to 'Back', admin_faqs_path
@@ -1,6 +1,6 @@
1
1
  = render 'menu'
2
2
 
3
- - content_for :title do
3
+ %h1
4
4
  -if params[:faqs] && params[:faqs] == 'active'
5
5
  = t('helpdesk.faqs.active')
6
6
  -elsif params[:faqs] && params[:faqs] == 'inactive'
@@ -27,7 +27,7 @@
27
27
  = t('helpdesk.faqs.faq.inactive')
28
28
  %div.span5
29
29
  = faq.title
30
- %div.span2
30
+ %div.span2
31
31
  = link_to t('helpdesk.show'), admin_faq_path(faq), class: 'btn btn-info btn-mini'
32
32
  = link_to t('helpdesk.edit'), edit_admin_faq_path(faq),class: 'btn btn-primary btn-mini'
33
33
  = link_to t('helpdesk.destroy'), admin_faq_path(faq), method: :delete, data: { confirm: 'Are you sure?' },class: 'btn btn-danger btn-mini'
@@ -1,6 +1,5 @@
1
1
  = render 'menu'
2
- - content_for :title do
3
- New faq
2
+ %h1 New faq
4
3
 
5
4
  = render 'form'
6
5
 
@@ -10,7 +10,7 @@
10
10
  = @faq.title
11
11
  %p
12
12
  %b Text:
13
- = raw @faq.text
13
+ = simple_format(@faq.text)
14
14
 
15
15
 
16
16