helpdesk 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/helpdesk/admin/tickets.js +1 -13
- data/app/assets/javascripts/helpdesk/application.js +0 -1
- data/app/assets/stylesheets/helpdesk/admin.css +0 -2
- data/app/assets/stylesheets/helpdesk/imports.css.scss +34 -0
- data/app/controllers/helpdesk/admin/base_controller.rb +2 -2
- data/app/controllers/helpdesk/admin/faqs_controller.rb +2 -7
- data/app/controllers/helpdesk/admin/subscribers_controller.rb +2 -8
- data/app/controllers/helpdesk/admin/ticket_types_controller.rb +3 -9
- data/app/controllers/helpdesk/admin/tickets_controller.rb +9 -21
- data/app/controllers/helpdesk/application_controller.rb +9 -4
- data/app/controllers/helpdesk/dashboard_controller.rb +2 -2
- data/app/controllers/helpdesk/faqs_controller.rb +80 -2
- data/app/controllers/helpdesk/subscribers_controller.rb +41 -18
- data/app/controllers/helpdesk/tickets_controller.rb +15 -20
- data/app/helpers/helpdesk/admin/tickets_helper.rb +0 -9
- data/app/helpers/helpdesk/helpdesk_helper.rb +6 -30
- data/app/helpers/helpdesk/tickets_helper.rb +0 -3
- data/app/mailers/helpdesk/comment_by_requester_confirmation +38 -0
- data/app/mailers/helpdesk/notifications_mailer.rb +1 -2
- data/app/models/helpdesk/comment.rb +5 -11
- data/app/models/helpdesk/faq.rb +1 -1
- data/app/models/helpdesk/ticket.rb +24 -27
- data/app/models/helpdesk/ticket_type.rb +4 -4
- data/app/views/helpdesk/admin/faqs/_form.html.haml +2 -2
- data/app/views/helpdesk/admin/faqs/edit.html.haml +9 -6
- data/app/views/helpdesk/admin/faqs/index.html.haml +2 -2
- data/app/views/helpdesk/admin/faqs/new.html.haml +1 -2
- data/app/views/helpdesk/admin/faqs/show.html.haml +1 -1
- data/app/views/helpdesk/admin/subscribers/edit.html.haml +1 -2
- data/app/views/helpdesk/admin/subscribers/index.html.haml +2 -3
- data/app/views/helpdesk/admin/subscribers/new.html.haml +1 -2
- data/app/views/helpdesk/admin/ticket_types/edit.html.haml +1 -2
- data/app/views/helpdesk/admin/ticket_types/index.html.haml +1 -1
- data/app/views/helpdesk/admin/ticket_types/new.html.haml +1 -2
- data/app/views/helpdesk/admin/tickets/_form.html.haml +9 -9
- data/app/views/helpdesk/admin/tickets/_ticket.html.haml +16 -15
- data/app/views/helpdesk/admin/tickets/edit.html.haml +5 -5
- data/app/views/helpdesk/admin/tickets/index.html.haml +5 -7
- data/app/views/helpdesk/admin/tickets/list.html.haml +2 -3
- data/app/views/helpdesk/admin/tickets/new.html.haml +2 -2
- data/app/views/helpdesk/admin/tickets/show.html.haml +9 -9
- data/app/views/helpdesk/faqs/_form.html.erb +33 -0
- data/app/views/helpdesk/faqs/edit.html.erb +6 -0
- data/app/views/helpdesk/faqs/index.html.erb +29 -0
- data/app/views/helpdesk/faqs/new.html.erb +5 -0
- data/app/views/helpdesk/faqs/show.html.erb +25 -0
- data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.pl.html.haml +32 -0
- data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.pl.html.haml +28 -0
- data/app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.pl.html.haml +32 -0
- data/app/views/helpdesk/notifications_mailer/comment_by_requester_notification.pl.html.haml +42 -0
- data/app/views/helpdesk/notifications_mailer/ticket_created_confirmation.pl.html.haml +34 -0
- data/app/views/helpdesk/notifications_mailer/ticket_created_notification.pl.html.haml +42 -0
- data/app/views/helpdesk/tickets/_form.html.haml +11 -11
- data/app/views/helpdesk/tickets/_ticket.html.haml +10 -10
- data/app/views/helpdesk/tickets/index.html.haml +2 -3
- data/app/views/helpdesk/tickets/new.html.haml +2 -2
- data/app/views/helpdesk/tickets/show.html.haml +12 -16
- data/app/views/layouts/helpdesk/_topmenu.html.haml +21 -27
- data/app/views/layouts/helpdesk/_topuser.html.haml +9 -32
- data/app/views/layouts/helpdesk/admin.html.haml +6 -14
- data/app/views/layouts/helpdesk/user.html.haml +6 -14
- data/config/initializers/simple_form.rb +144 -85
- data/config/locales/helpdesk.en.yml +3 -107
- data/config/locales/helpdesk.pl.yml +7 -46
- data/config/routes.rb +5 -6
- data/db/migrate/20130521105605_create_helpdesk_ticket_types.rb +1 -21
- data/db/migrate/20130521132216_add_tr_class_to_ticket_type.rb +5 -0
- data/lib/generators/helpdesk/install_generator.rb +0 -11
- data/lib/generators/helpdesk/templates/README +9 -17
- data/lib/generators/helpdesk/templates/helpdesk.rb +6 -9
- data/lib/helpdesk.rb +4 -4
- data/lib/helpdesk/engine.rb +0 -8
- data/lib/helpdesk/version.rb +1 -1
- metadata +28 -137
- data/app/assets/stylesheets/helpdesk/imports.css.sass +0 -0
- data/app/views/helpdesk/faqs/index.html.haml +0 -20
- data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.html.haml +0 -15
- data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.html.haml +0 -19
- data/app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.html.haml +0 -16
- data/app/views/helpdesk/notifications_mailer/comment_by_requester_notification.html.haml +0 -27
- data/app/views/helpdesk/notifications_mailer/ticket_created_confirmation.html.haml +0 -16
- data/app/views/helpdesk/notifications_mailer/ticket_created_notification.html.haml +0 -21
- data/app/views/layouts/mailer_layout.html.haml +0 -20
- data/config/initializers/globalize.rb +0 -4
@@ -1,16 +1,13 @@
|
|
1
1
|
module Helpdesk
|
2
|
-
class TicketsController <
|
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
|
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
|
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 =
|
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 =
|
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 =
|
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 =
|
72
|
+
@ticket = Ticket.find(params[:id])
|
69
73
|
|
70
74
|
respond_to do |format|
|
71
|
-
if @ticket.update_attributes(
|
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
|
-
|
7
|
-
|
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
|
47
|
-
raw("<
|
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)
|
@@ -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
|
7
|
-
scope :pub,
|
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
|
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
|
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
|
data/app/models/helpdesk/faq.rb
CHANGED
@@ -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
|
-
|
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-
|
6
|
-
[ :open, 'label-warning',2],
|
7
|
-
[ :waiting, 'label-info',2],
|
8
|
-
[ :solved, 'label-success',0],
|
9
|
-
[ :not_fixable, 'label-
|
10
|
-
[ :unreachable, 'label-
|
11
|
-
[ :bug, 'label-
|
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[
|
15
|
-
STATUS_STATUS_BY_KEY= Hash[*STATUSES.map { |i| [i[0], i[
|
16
|
-
OPEN_STATUSES_KEYS = STATUSES.map { |i| (i[
|
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,
|
28
|
+
has_many :comments, :order => "created_at DESC"
|
23
29
|
|
24
30
|
|
25
|
-
|
26
|
-
scope :
|
27
|
-
scope :
|
28
|
-
|
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 =
|
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
|
-
|
5
|
+
attr_accessible :active, :position,:title,:translations_attributes,:tr_class
|
6
6
|
|
7
|
-
default_scope
|
7
|
+
default_scope order('position ASC')
|
8
8
|
|
9
|
-
scope :active,
|
10
|
-
scope :inactive,
|
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 => {:
|
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
|
-
|
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
|
-
|
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'
|