helpdesk 0.0.2

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 (116) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +28 -0
  4. data/app/assets/javascripts/helpdesk/admin/dashboard.js +2 -0
  5. data/app/assets/javascripts/helpdesk/admin/tickets.js +20 -0
  6. data/app/assets/javascripts/helpdesk/application.js +19 -0
  7. data/app/assets/javascripts/helpdesk/ckeditor.js +11 -0
  8. data/app/assets/javascripts/helpdesk/dashboard.js +2 -0
  9. data/app/assets/javascripts/helpdesk/faqs.js +2 -0
  10. data/app/assets/javascripts/helpdesk/subscribers.js +2 -0
  11. data/app/assets/stylesheets/helpdesk/admin/bootstrap_overrides.css +8 -0
  12. data/app/assets/stylesheets/helpdesk/admin/dashboard.css +4 -0
  13. data/app/assets/stylesheets/helpdesk/admin/tickets.css +44 -0
  14. data/app/assets/stylesheets/helpdesk/admin.css +8 -0
  15. data/app/assets/stylesheets/helpdesk/application.css +16 -0
  16. data/app/assets/stylesheets/helpdesk/dashboard.css +4 -0
  17. data/app/assets/stylesheets/helpdesk/faqs.css.scss +3 -0
  18. data/app/assets/stylesheets/helpdesk/imports.css.sass +0 -0
  19. data/app/assets/stylesheets/helpdesk/subscribers.css.scss +3 -0
  20. data/app/assets/stylesheets/helpdesk/tickets.css.sass +49 -0
  21. data/app/controllers/helpdesk/admin/base_controller.rb +32 -0
  22. data/app/controllers/helpdesk/admin/dashboard_controller.rb +6 -0
  23. data/app/controllers/helpdesk/admin/faqs_controller.rb +100 -0
  24. data/app/controllers/helpdesk/admin/subscribers_controller.rb +49 -0
  25. data/app/controllers/helpdesk/admin/ticket_types_controller.rb +52 -0
  26. data/app/controllers/helpdesk/admin/tickets_controller.rb +76 -0
  27. data/app/controllers/helpdesk/application_controller.rb +20 -0
  28. data/app/controllers/helpdesk/dashboard_controller.rb +26 -0
  29. data/app/controllers/helpdesk/faqs_controller.rb +7 -0
  30. data/app/controllers/helpdesk/subscribers_controller.rb +62 -0
  31. data/app/controllers/helpdesk/tickets_controller.rb +91 -0
  32. data/app/helpers/helpdesk/admin/dashboard_helper.rb +6 -0
  33. data/app/helpers/helpdesk/admin/tickets_helper.rb +13 -0
  34. data/app/helpers/helpdesk/dashboard_helper.rb +4 -0
  35. data/app/helpers/helpdesk/faqs_helper.rb +4 -0
  36. data/app/helpers/helpdesk/helpdesk_helper.rb +59 -0
  37. data/app/helpers/helpdesk/subscribers_helper.rb +4 -0
  38. data/app/helpers/helpdesk/tickets_helper.rb +7 -0
  39. data/app/mailers/helpdesk/notifications_mailer.rb +42 -0
  40. data/app/models/helpdesk/comment.rb +31 -0
  41. data/app/models/helpdesk/faq.rb +12 -0
  42. data/app/models/helpdesk/subscriber.rb +10 -0
  43. data/app/models/helpdesk/ticket.rb +85 -0
  44. data/app/models/helpdesk/ticket_type.rb +13 -0
  45. data/app/views/helpdesk/admin/dashboard/index.html.erb +2 -0
  46. data/app/views/helpdesk/admin/faqs/_form.html.haml +20 -0
  47. data/app/views/helpdesk/admin/faqs/_menu.html.haml +9 -0
  48. data/app/views/helpdesk/admin/faqs/edit.html.haml +11 -0
  49. data/app/views/helpdesk/admin/faqs/index.html.haml +59 -0
  50. data/app/views/helpdesk/admin/faqs/new.html.haml +7 -0
  51. data/app/views/helpdesk/admin/faqs/show.html.haml +19 -0
  52. data/app/views/helpdesk/admin/subscribers/_form.html.haml +12 -0
  53. data/app/views/helpdesk/admin/subscribers/_menu.html.haml +9 -0
  54. data/app/views/helpdesk/admin/subscribers/edit.html.haml +10 -0
  55. data/app/views/helpdesk/admin/subscribers/index.html.haml +31 -0
  56. data/app/views/helpdesk/admin/subscribers/new.html.haml +7 -0
  57. data/app/views/helpdesk/admin/ticket_types/_form.html.haml +20 -0
  58. data/app/views/helpdesk/admin/ticket_types/_menu.html.haml +11 -0
  59. data/app/views/helpdesk/admin/ticket_types/edit.html.haml +10 -0
  60. data/app/views/helpdesk/admin/ticket_types/index.html.haml +28 -0
  61. data/app/views/helpdesk/admin/ticket_types/new.html.haml +8 -0
  62. data/app/views/helpdesk/admin/ticket_types/show.html.haml +11 -0
  63. data/app/views/helpdesk/admin/tickets/_form.html.haml +23 -0
  64. data/app/views/helpdesk/admin/tickets/_menu.html.haml +17 -0
  65. data/app/views/helpdesk/admin/tickets/_ticket.html.haml +59 -0
  66. data/app/views/helpdesk/admin/tickets/edit.html.haml +30 -0
  67. data/app/views/helpdesk/admin/tickets/index.html.haml +42 -0
  68. data/app/views/helpdesk/admin/tickets/list.html.haml +18 -0
  69. data/app/views/helpdesk/admin/tickets/new.html.haml +4 -0
  70. data/app/views/helpdesk/admin/tickets/show.html.haml +36 -0
  71. data/app/views/helpdesk/dashboard/index.html.erb +3 -0
  72. data/app/views/helpdesk/faqs/index.html.haml +20 -0
  73. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_confirmation.html.haml +15 -0
  74. data/app/views/helpdesk/notifications_mailer/comment_by_helpdesk_notification.html.haml +19 -0
  75. data/app/views/helpdesk/notifications_mailer/comment_by_requester_confirmation.html.haml +16 -0
  76. data/app/views/helpdesk/notifications_mailer/comment_by_requester_notification.html.haml +27 -0
  77. data/app/views/helpdesk/notifications_mailer/ticket_created_confirmation.html.haml +16 -0
  78. data/app/views/helpdesk/notifications_mailer/ticket_created_notification.html.haml +21 -0
  79. data/app/views/helpdesk/subscribers/_form.html.erb +37 -0
  80. data/app/views/helpdesk/subscribers/edit.html.erb +6 -0
  81. data/app/views/helpdesk/subscribers/index.html.erb +31 -0
  82. data/app/views/helpdesk/subscribers/new.html.erb +5 -0
  83. data/app/views/helpdesk/subscribers/show.html.erb +30 -0
  84. data/app/views/helpdesk/tickets/_form.html.haml +36 -0
  85. data/app/views/helpdesk/tickets/_menu.html.haml +10 -0
  86. data/app/views/helpdesk/tickets/_ticket.html.haml +54 -0
  87. data/app/views/helpdesk/tickets/index.html.haml +16 -0
  88. data/app/views/helpdesk/tickets/new.html.haml +4 -0
  89. data/app/views/helpdesk/tickets/show.html.haml +38 -0
  90. data/app/views/layouts/helpdesk/_topmenu.html.haml +28 -0
  91. data/app/views/layouts/helpdesk/_topuser.html.haml +32 -0
  92. data/app/views/layouts/helpdesk/admin.html.haml +35 -0
  93. data/app/views/layouts/helpdesk/user.html.haml +33 -0
  94. data/app/views/layouts/mailer_layout.html.haml +20 -0
  95. data/config/initializers/globalize.rb +4 -0
  96. data/config/initializers/simple_form.rb +117 -0
  97. data/config/locales/helpdesk.en.yml +111 -0
  98. data/config/locales/helpdesk.pl.yml +119 -0
  99. data/config/locales/helpdesk_routes.yml +6 -0
  100. data/config/locales/simple_form.en.yml +24 -0
  101. data/config/locales/simple_form.pl.yml +15 -0
  102. data/config/routes.rb +22 -0
  103. data/db/migrate/20120420104051_create_helpdesk_tickets.rb +14 -0
  104. data/db/migrate/20120423113938_create_helpdesk_comments.rb +12 -0
  105. data/db/migrate/20130521105605_create_helpdesk_ticket_types.rb +36 -0
  106. data/db/migrate/20130522085614_create_helpdesk_faqs.rb +17 -0
  107. data/db/migrate/20130522090420_create_helpdesk_subscribers.rb +13 -0
  108. data/lib/generators/helpdesk/install_generator.rb +35 -0
  109. data/lib/generators/helpdesk/templates/README +31 -0
  110. data/lib/generators/helpdesk/templates/helpdesk.rb +33 -0
  111. data/lib/helpdesk/engine.rb +29 -0
  112. data/lib/helpdesk/version.rb +3 -0
  113. data/lib/helpdesk.rb +39 -0
  114. data/lib/tasks/prepare_ci_env.rake +27 -0
  115. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  116. metadata +508 -0
@@ -0,0 +1,54 @@
1
+ %table.table.table-bordered
2
+ %tbody
3
+ %tr{:class=>ticket.ticket_type.tr_class}
4
+ %td{colspan:2}
5
+ %h4
6
+ ="##{ticket.subject}"
7
+ %tr
8
+ %td{style:'width:100px'}
9
+ = I18n::l(ticket.created_at, :format=>:short)
10
+ - if ticket.requester
11
+ = ticket.requester.send Helpdesk.display_user.to_sym
12
+ %td{rowspan:2}
13
+ = status_label Helpdesk::Ticket::STATUS_BY_KEY[ticket.status.to_sym], Helpdesk::Ticket::STATUS_CLASS_BY_KEY[ticket.status.to_sym]
14
+ = ticket.ticket_type.title
15
+
16
+ = auto_link(simple_format(ticket.description), :html => { :target => "_blank" })
17
+ %tr
18
+ %td
19
+ - if ticket.assignee
20
+ = t('helpdesk.tickets.assignee_to')
21
+ = ticket.assignee.send Helpdesk.display_user.to_sym
22
+ %tr
23
+ %td
24
+ %span.btn.disabled
25
+ = ico('comment')
26
+ = ticket.comments.pub.size
27
+ %td
28
+ %ul.comments.unstyled
29
+ - ticket.comments.pub.each do |comment|
30
+ - if comment.persisted?
31
+ %li.comment{:id=>"comment#{comment.id}"}
32
+ %div.comment-left
33
+ - if comment.public
34
+ = status_label ico('envelope') + t('helpdesk.comments.send') ,'label-success'
35
+ - else
36
+ = status_label t('helpdesk.comments.note'),''
37
+ %br
38
+ %a{class:'anchor', href: "#comment#{comment.id}"}
39
+ = "#"
40
+ %div.comment-header
41
+ -if comment.author != ticket.requester
42
+ = status_label ico('user')+ t('helpdesk.comments.helpdesk'),'label-info'
43
+
44
+ = comment.author.send Helpdesk.display_user.to_sym
45
+ %small
46
+ = time_ago_in_words(comment.created_at)
47
+ temu
48
+ %div.comment-body
49
+ = auto_link(simple_format(comment.comment), :html => { :target => "_blank" })
50
+
51
+ %tr{:class=>ticket.ticket_type.tr_class}
52
+ %td{colspan:2}
53
+ - if show_button
54
+ = link_to ticket.subject, ticket_url(I18n.locale,ticket), class: 'btn btn-block'
@@ -0,0 +1,16 @@
1
+ - content_for :title do
2
+ -if params[:tickets] && params[:tickets] == 'closed'
3
+ = t('helpdesk.tickets.closed')
4
+
5
+ -else
6
+ = t('helpdesk.tickets.active')
7
+
8
+
9
+ = render 'menu'
10
+
11
+
12
+ - if @tickets.size == 0
13
+ = t('helpdesk.tickets.you_have_no_tickets')
14
+ - @tickets.each do |ticket|
15
+ = render 'ticket', ticket: ticket, show_button:true
16
+ = paginate @tickets
@@ -0,0 +1,4 @@
1
+ = render 'menu'
2
+ - content_for :title do
3
+ = t('helpdesk.new_ticket')
4
+ = render 'form'
@@ -0,0 +1,38 @@
1
+ = render 'menu'
2
+
3
+ = render 'ticket', :ticket=>@ticket, show_button:false
4
+
5
+
6
+ - unless @ticket.open?
7
+ %table.table
8
+ %tbody
9
+ %tr{:class=>@ticket.ticket_type.tr_class}
10
+ %td{style:'width:100px'}
11
+ %td
12
+ = t('helpdesk.tickets.ticket_closed')
13
+ - if @ticket.open? || helpdesk_user == @ticket.requester
14
+ %table.table
15
+ %tbody
16
+ %tr{:class=>@ticket.ticket_type.tr_class}
17
+ %td{style:'width:100px'}
18
+ %td
19
+ = simple_form_for(@ticket, :html => {:class => 'form-vertical' }) do |f|
20
+ - if @ticket.errors.any?
21
+ %div.error_explanation
22
+ %h2
23
+ = "#{pluralize(@ticket.errors.count, "error")} prohibited this ticket from being saved:"
24
+ %ul
25
+ - @ticket.errors.full_messages.each do |msg|
26
+ %li
27
+ = msg
28
+
29
+ = f.simple_fields_for :comments,@ticket.comments.build do |tickets_form|
30
+ - unless tickets_form.object.persisted?
31
+ = tickets_form.input :comment, :input_html=>{class: 'comment-textarea',rows: 5}
32
+ / , :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'mini'},:language => I18n.locale}
33
+
34
+ = tickets_form.input :public, :input_html => {:value=>1},:as=>:hidden
35
+ = tickets_form.input :author_id, :as => :hidden, :input_html => { :value => helpdesk_user.id }
36
+ %div
37
+ = f.button :submit, :class => 'btn btn-primary'
38
+ = submit_tag 'Anuluj', :type => :reset, :class => "btn btn-default"
@@ -0,0 +1,28 @@
1
+ %nav.navbar.navbar-default#site_topmmenu{role: 'navigation'}
2
+ .navbar-header
3
+ %button.navbar-toggle{"data-target" => "#bs-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
4
+ %span.sr-only Toggle navigation
5
+ %span.icon-bar
6
+ %span.icon-bar
7
+ %span.icon-bar
8
+ =link_to Helpdesk.site_address, main_app.root_path, :class=>'navbar-brand', :title => t('helpdesk.name')
9
+ =link_to t('helpdesk.name'), admin_root_path, :class=>'navbar-brand', :title => t('helpdesk.name')
10
+ #bs-navbar-collapse-1.collapse.navbar-collapse.in
11
+ %ul.nav.navbar-nav
12
+ = menu_li t('helpdesk.tickets.title'),admin_tickets_path
13
+ = menu_li t('helpdesk.ticket_types.title'),admin_ticket_types_path
14
+ = menu_li t('helpdesk.subscribers.title'),admin_subscribers_path
15
+ = menu_li t('helpdesk.faqs.title'),admin_faqs_path
16
+
17
+ %ul.nav.navbar-nav.navbar-right
18
+ %li.dropdown.user
19
+ = link_to current_user.send(Helpdesk.display_user.to_sym), "#",:class=>"dropdown-toggle",data:{toggle:"dropdown"}
20
+ %ul.dropdown-menu
21
+ %li=link_to 'Home',main_app.root_path
22
+ %li=link_to t('users.sign_out'),main_app.destroy_user_session_path, :method => :delete, :class => 'icon exit blue'
23
+
24
+ %li.dropdown
25
+ = link_to t('helpdesk.lang'),"#",:class=>"dropdown-toggle",data:{toggle:"dropdown"}
26
+ %ul.dropdown-menu
27
+ %li= link_to "English", params.merge({:locale => :en})
28
+ %li= link_to "Polski", params.merge({:locale => :pl})
@@ -0,0 +1,32 @@
1
+ %nav.navbar.navbar-default#site_topmmenu{role: 'navigation'}
2
+ .navbar-header
3
+ %button.navbar-toggle{"data-target" => "#bs-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
4
+ %span.sr-only Toggle navigation
5
+ %span.icon-bar
6
+ %span.icon-bar
7
+ %span.icon-bar
8
+ =link_to Helpdesk.site_address, main_app.root_path, :class=>'navbar-brand', :title => Helpdesk.site_address
9
+ =link_to Helpdesk.name, root_path, :class=>'navbar-brand', :title => Helpdesk.name
10
+ #bs-navbar-collapse-1.collapse.navbar-collapse.in
11
+ %ul.nav.navbar-nav
12
+ = menu_li t('helpdesk.tickets.title'),tickets_path
13
+ = menu_li t('helpdesk.faq'),faqs_path
14
+
15
+ %ul.nav.navbar-nav.navbar-right
16
+ %li.dropdown.user
17
+ = link_to current_user.send(Helpdesk.display_user.to_sym), "#",:class=>"dropdown-toggle",data:{toggle:"dropdown"}
18
+ %ul.dropdown-menu
19
+ %li=link_to 'Home',main_app.root_path
20
+ %li=link_to t('users.sign_out'),main_app.destroy_user_session_path, :method => :delete, :class => 'icon exit blue'
21
+
22
+ %li.dropdown
23
+ = link_to t('helpdesk.lang'),"#",:class=>"dropdown-toggle",data:{toggle:"dropdown"}
24
+ %ul.dropdown-menu
25
+ %li= link_to "English", params.merge({:locale => :en})
26
+ %li= link_to "Polski", params.merge({:locale => :pl})
27
+
28
+
29
+
30
+
31
+
32
+
@@ -0,0 +1,35 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title
5
+ = t :name, :scope => :helpdesk
6
+ = javascript_include_tag "helpdesk/application"
7
+ = stylesheet_link_tag "helpdesk/admin", :media => "all"
8
+ = javascript_tag "$(document).ready(function(){ $('.dropdown-toggle').dropdown();$('.alert').alert();})"
9
+ = csrf_meta_tags
10
+ = yield :head
11
+ %body
12
+ .container
13
+ = render 'layouts/helpdesk/topmenu'
14
+ .content
15
+ .row
16
+ .col.col-md-3#site_leftmenu
17
+ =yield :left
18
+ .col.col-md-9#site_leftmenu
19
+ .flash
20
+ - flash.each do |type, message|
21
+ %div{:class => "alert alert-#{type}", "data-alert"=>"alert"}
22
+ =link_to "x",'#', :class=>'close', :'data-dismiss'=>"alert"
23
+ %p= message
24
+ - if content_for?(:title)
25
+ .panel.panel-default
26
+ .panel-heading
27
+ %h3.panel-title
28
+ = content_for?(:title) ? content_for(:title) : ''
29
+ .panel-body
30
+ = yield
31
+ - else
32
+ = yield
33
+ =yield :scripts
34
+
35
+
@@ -0,0 +1,33 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title
5
+ = t :name, :scope => :helpdesk
6
+ = javascript_include_tag "helpdesk/application"
7
+ = stylesheet_link_tag "helpdesk/application", :media => "all"
8
+ = javascript_tag "$(document).ready(function(){ $('.dropdown-toggle').dropdown();$('.alert').alert();})"
9
+ = csrf_meta_tags
10
+ = yield :head
11
+ %body
12
+ .container
13
+ = render 'layouts/helpdesk/topuser'
14
+ .content
15
+ .row
16
+ .col.col-md-3#site_leftmenu
17
+ =yield :left
18
+ .col.col-md-9#site_leftmenu
19
+ .flash
20
+ - flash.each do |type, message|
21
+ %div{:class => "alert alert-#{type}", "data-alert"=>"alert"}
22
+ =link_to "x",'#', :class=>'close', :'data-dismiss'=>"alert"
23
+ %p= message
24
+ - if content_for?(:title)
25
+ .panel.panel-default
26
+ .panel-heading
27
+ %h3.panel-title
28
+ = content_for?(:title) ? content_for(:title) : ''
29
+ .panel-body
30
+ = yield
31
+ - else
32
+ = yield
33
+ =yield :scripts
@@ -0,0 +1,20 @@
1
+ :plain
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3
+ %html
4
+ %head
5
+ %body
6
+ %div{:style=>'margin: 0px; padding: 20px 0px; background-color: #f0f0f0;'}
7
+ %div{:style=>'margin: 0px auto; width: 600px; background-color: #fafafa; padding: 20px; border-radius: 2px; box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.3);'}
8
+ %h2
9
+ =yield :title
10
+ %div
11
+ = yield
12
+ %p
13
+ = t('helpdesk.mailer.footer_nice')
14
+ %br
15
+ = Helpdesk.site_name
16
+ %br
17
+ %a{:href=>'http://'+Helpdesk.site_address}
18
+ = Helpdesk.site_address
19
+ %div{:style=>'padding: 8px 0px; font-size: 12px; font-family: "Helvetica", "Arial", Sans-serif; text-align: justify; border-top: 0px solid #c0c0c0; color: #808080; '}
20
+ = t('helpdesk.mailer.footer_info', url: root_url).html_safe
@@ -0,0 +1,4 @@
1
+ # Globalize.fallbacks = {
2
+ # :en => [:en, :pl],
3
+ # :pl => [:pl, :en],
4
+ # }
@@ -0,0 +1,117 @@
1
+ inputs = %w[
2
+ CollectionSelectInput
3
+ DateTimeInput
4
+ FileInput
5
+ GroupedCollectionSelectInput
6
+ NumericInput
7
+ PasswordInput
8
+ RangeInput
9
+ StringInput
10
+ TextInput
11
+ ]
12
+
13
+
14
+ # Instead of creating top-level custom input classes like TextInput, we wrap it into a module and override
15
+ # mapping in SimpleForm::FormBuilder directly
16
+ #
17
+ unless Module.const_defined?(:SimpleFormBootstrapInputs)
18
+ SimpleFormBootstrapInputs = Module.new
19
+ inputs.each do |input_type|
20
+ superclass = "SimpleForm::Inputs::#{input_type}".constantize
21
+
22
+ new_class = SimpleFormBootstrapInputs.const_set(input_type, Class.new(superclass) do
23
+ def input_html_classes
24
+ super.push('form-control')
25
+ end
26
+ end)
27
+
28
+ # Now override existing usages of superclass with new_class
29
+ SimpleForm::FormBuilder.mappings.each do |(type, target_class)|
30
+ if target_class == superclass
31
+ SimpleForm::FormBuilder.map_type(type, to: new_class)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ # inputs.each do |input_type|
37
+ # superclass = "SimpleForm::Inputs::#{input_type}".constantize
38
+
39
+ # new_class = Class.new(superclass) do
40
+ # def input_html_classes
41
+ # super.push('form-control')
42
+ # end
43
+ # end
44
+
45
+ # Object.const_set(input_type, new_class)
46
+ # end
47
+
48
+ # Use this setup block to configure all options available in SimpleForm.
49
+ SimpleForm.setup do |config|
50
+
51
+ config.browser_validations = true
52
+
53
+ config.boolean_style = :nested
54
+
55
+ config.wrappers :bootstrap3, tag: 'div', class: 'form-group', error_class: 'has-error',
56
+ defaults: { input_html: { class: 'default_class' } } do |b|
57
+
58
+ b.use :html5
59
+ b.use :min_max
60
+ b.use :maxlength
61
+ b.use :placeholder
62
+
63
+ b.optional :pattern
64
+ b.optional :readonly
65
+
66
+ b.use :label_input
67
+ b.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
68
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
69
+ end
70
+
71
+ config.wrappers :prepend, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
72
+ b.use :html5
73
+ b.use :placeholder
74
+ b.wrapper tag: 'div', class: 'controls' do |input|
75
+ input.wrapper tag: 'div', class: 'input-group' do |prepend|
76
+ prepend.use :label , wrap_with: {class: "input-group-addon"} ###Please note setting class here fro the label does not currently work (let me know if you know a workaround as this is the final hurdle)
77
+ prepend.use :input
78
+ end
79
+ input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
80
+ input.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
81
+ end
82
+ end
83
+
84
+ config.wrappers :append, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
85
+ b.use :html5
86
+ b.use :placeholder
87
+ b.wrapper tag: 'div', class: 'controls' do |input|
88
+ input.wrapper tag: 'div', class: 'input-group' do |prepend|
89
+ prepend.use :input
90
+ prepend.use :label , wrap_with: {class: "input-group-addon"} ###Please note setting class here fro the label does not currently work (let me know if you know a workaround as this is the final hurdle)
91
+ end
92
+ input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
93
+ input.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' }
94
+ end
95
+ end
96
+
97
+ config.wrappers :checkbox, tag: :div, class: "checkbox", error_class: "has-error" do |b|
98
+
99
+ # Form extensions
100
+ b.use :html5
101
+
102
+ # Form components
103
+ b.wrapper tag: :label do |ba|
104
+ ba.use :input
105
+ ba.use :label_text
106
+ end
107
+
108
+ b.use :hint, wrap_with: { tag: :p, class: "help-block" }
109
+ b.use :error, wrap_with: { tag: :span, class: "help-block text-danger" }
110
+ end
111
+
112
+ # Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
113
+ # Check the Bootstrap docs (http://getbootstrap.com/)
114
+ # to learn about the different styles for forms and inputs,
115
+ # buttons and other elements.
116
+ config.default_wrapper = :bootstrap3
117
+ end
@@ -0,0 +1,111 @@
1
+ en:
2
+
3
+ helpdesk:
4
+ lang: Language
5
+ Show: Show
6
+ edit: Edit
7
+ Destroy: Delete
8
+ name: Helpdesk
9
+ new_ticket: New
10
+ tickets:
11
+ new: New Issue
12
+ my: My Issue
13
+ unassigned: Unassigned
14
+ closed: Closed Issues
15
+ all: All issues
16
+ title: Issues
17
+ active: Active Issues
18
+ assignee_to: Assigned to
19
+ assign_me: I take it
20
+ not_assigned: Not assigned
21
+ is_now_assigned: "Issue %{subject} has been assigned to you"
22
+ visible_to_autor: Visible to the author - send an email
23
+ you_have_no_tickets: "No issues "
24
+ ticket_closed: Issues closed
25
+ subject: Subject of
26
+ description: Content
27
+ cancel: cancel
28
+ send: Send
29
+ ticket: Issue
30
+ faq: FAQ
31
+ comments:
32
+ title: Comments
33
+ note: Memo
34
+ send: Sent
35
+ received: Received
36
+ note: note
37
+ author: Re. author
38
+ helpdesk: Re. BOK
39
+ ticket_types:
40
+ title: Types of issues
41
+ new: A new type of issues
42
+ all: All kinds of issues
43
+ active: Active types of issues
44
+ inactive: Inactive types of issues
45
+
46
+ dashboard: Dashboard
47
+
48
+ subscribers:
49
+ title: Subscribers
50
+ confirmed: Confirmed subskrybenci
51
+ unconfirmed: Unconfirmed
52
+ all: All Subscribers
53
+ new: Add Subscriber
54
+
55
+ faqs:
56
+ title: FAQ
57
+ title_s: Frequently Asked Questions
58
+ active: Active Questions
59
+ inactive: Inactive questions
60
+ all: All the questions
61
+ new: New Question
62
+ by: by
63
+ faq:
64
+ active: active
65
+ inactive: inactive
66
+
67
+ mailer:
68
+ comment_by_helpdesk_confirmation:
69
+ title: "Response to the issue was sent"
70
+ re_ticket: "New comment for Issue:"
71
+ response_content: "Content of the comment:"
72
+ comment_by_helpdesk_notification:
73
+ title: "%{user}, new reply received for issue:"
74
+ comment_content: "Content of the comment:"
75
+ comment_by_requester_notification:
76
+ title: "New reply received for issue:"
77
+ comment_content: "Content of the comment:"
78
+ comment_by_requester_confirmation:
79
+ title: "%{user}, thank you for submitting a comment to the Issue"
80
+ subject: "New comment for Issie - %{subject}"
81
+ comment_content: "Content of the comment:"
82
+ ticket_created_confirmation:
83
+ title: "%{user}, thank you for submitting"
84
+ subject: "Your issue subject is:"
85
+ ticket_content: "Content of the issue:"
86
+ info_time: "We appreciate your time, so we will try to respond as quickly as possible."
87
+ ticket_created_notification:
88
+ title: "New Issue was created"
89
+ requester_info: "Author"
90
+ ticket_content: "The content of the issue:"
91
+ ticket_url_title: "At this address you can track the issue:"
92
+ footer_info: "This message has been generated automatically. Do not answer it. If you do not have initiated action to send this message please report it to us <a href=\"%{url}\"> clicking here </a>."
93
+ footer_nice: "Have a nice day"
94
+
95
+ activerecord:
96
+ models:
97
+ Helpdesk: helpdesk
98
+ helpdesk/ticket: Issue
99
+ helpdesk/comment: Comment
100
+ attributes:
101
+ helpdesk/comment:
102
+ comment: Additional description
103
+ public: Visible/Send Email
104
+ helpdesk/ticket:
105
+ requester_id: Requester
106
+ subject: Subject
107
+ Status: Status
108
+ assignee_id: Assigned
109
+ ticket_type_id: Type of notification
110
+ Description: Description
111
+ comments: More details
@@ -0,0 +1,119 @@
1
+ pl:
2
+
3
+ helpdesk:
4
+ lang: Język
5
+ show: Pokaż
6
+ edit: Edytuj
7
+ destroy: Usuń
8
+ name: Helpdesk
9
+ new_ticket: Nowe zgłoszenie
10
+ tickets:
11
+ new: Nowe zgłoszenie
12
+ my: Moje zgłoszenia
13
+ unassigned: Nieprzypisane zgłoszenia
14
+ closed: Zamknięte zgłoszenia
15
+ all: Wszystkie zgłoszenia
16
+ title: Zgłoszenia
17
+ active: Aktywne zgłoszenia
18
+ assignee_to: Przypisane do
19
+ assign_me: Biore to
20
+ not_assigned: Nie przypisany
21
+ is_now_assigned: "Zgłoszenie %{subject} zostało przypisane do Ciebie"
22
+ visible_to_autor: Widoczny dla zgłaszającego - wyślij emaila
23
+ you_have_no_tickets: "Brak zgłoszeń"
24
+ ticket_closed: Zgłoszenie zamknięte
25
+ subject: Temat zgłoszenia
26
+ description: Treść
27
+ cancel: Anuluj
28
+ send: Wyślij
29
+ statuses:
30
+ new: "Nowe"
31
+ open: "Otwarte"
32
+ waiting: "Otwarte: oczekujące"
33
+ solved: "Zamknięte: problem rozwiązany"
34
+ not_fixable: "Zamknięte: nienaprawialne"
35
+ unreachable: "Zamknięte: klient nieosiągalny"
36
+ bug: "Zamknięte: Przeniesione do bug tracker'a"
37
+
38
+ ticket: Zgłoszenie
39
+ faq: FAQ
40
+ comments:
41
+ title: Komentarze
42
+ note: Notatka
43
+ send: Wysłane
44
+ received: Odebrane
45
+ note: notatka
46
+ author: Odp. autora
47
+ helpdesk: Odp. BOK
48
+ ticket_types:
49
+ title: Rodzaje zgłoszeń
50
+ new: Nowy rodzaj zgłoszenia
51
+ all: Wszystkie rodzaje zgłoszeń
52
+ active: Aktywne rodzaje zgłoszeń
53
+ inactive: Nieaktywne rodzaje zgłoszeń
54
+
55
+ dashboard: Dashboard
56
+
57
+ subscribers:
58
+ title: Subskrybenci
59
+ confirmed: Potwierdzeni subskrynenci
60
+ unconfirmed: Niepotwierdzeni
61
+ all: Wszyscy subskrybenci
62
+ new: Dodaj subskrybenta
63
+
64
+ faqs:
65
+ title: FAQ
66
+ title_s: Często zadawane pytania
67
+ active: Aktywne pytania
68
+ inactive: Nieaktywne pytania
69
+ all: Wszystkie pytania
70
+ new: Nowe pytanie
71
+ by: przez
72
+ faq:
73
+ active: aktywne
74
+ inactive: nieaktywne
75
+
76
+ mailer:
77
+ comment_by_helpdesk_confirmation:
78
+ title: "Wysłano odpowiedź do zgłoszenia"
79
+ re_ticket: "Odpowiedź dotyczy zgłoszenia"
80
+ response_content: "Treść odpowiedzi:"
81
+ comment_by_requester_notification:
82
+ title: "Pojawiła się nowa odpowiedź do zgłoszenie:"
83
+ comment_content: "Treść odpowiedzi:"
84
+ comment_by_requester_confirmation:
85
+ title: "%{user}, dziękujemy za przesłanie odpowiedzi do zgłoszenia"
86
+ subject: "Odpowiedź dotyczy Twojego zgłoszenia - %{subject}"
87
+ comment_content: "Treść odpowiedzi:"
88
+ ticket_created_confirmation:
89
+ title: "%{user}, dziękujemy za przesłanie zgłoszenia"
90
+ subject: Temat Twojego zgłoszenia to
91
+ ticket_content: "Treść zgłoszenia:"
92
+ info_time: "Cenimy Twój czas, dlatego staramy się odpowiadać, tak szybko jak to możliwe."
93
+ ticket_created_notification:
94
+ title: "Pojawiło się nowe zgłoszenie:"
95
+ requester_info: "Informacje o zgłaszającym:"
96
+ ticket_content: "Treść zgłoszenia:"
97
+ ticket_url_title: "Pod tym adresem można śledzić zgłoszenie:"
98
+ footer_info: "Ta wiadomość została wygenerowana automatycznie. Nie odpowiadaj na nią. Jeśli nie zainicjowałeś akcji wysyłania tej wiadomości zgłoś to nam <a href=\"%{url}\">klikając tutaj</a>."
99
+ footer_nice: "Życzymy miłego dnia"
100
+
101
+
102
+
103
+ activerecord:
104
+ models:
105
+ helpdesk: helpdesk
106
+ helpdesk/ticket: Zgłoszenie
107
+ helpdesk/comment: Komentarz
108
+ attributes:
109
+ helpdesk/comment:
110
+ comment: Dodatkowy opis
111
+ public: Widoczny/Wyślij
112
+ helpdesk/ticket:
113
+ requester_id: Zgłaszający
114
+ subject: Temat
115
+ status: Status
116
+ assignee_id: Przypisane
117
+ ticket_type_id: Rodzaj zgłoszenia
118
+ description: Opis
119
+ comments: Dodatkowy opis
@@ -0,0 +1,6 @@
1
+ en:
2
+ routes:
3
+
4
+ pl:
5
+ routes:
6
+ tickets: zgloszenia
@@ -0,0 +1,24 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Some errors were found, please take a look:"
13
+ # Labels and hints examples
14
+ # labels:
15
+ # password: 'Password'
16
+ # user:
17
+ # new:
18
+ # email: 'E-mail para efetuar o sign in.'
19
+ # edit:
20
+ # email: 'E-mail.'
21
+ # hints:
22
+ # username: 'User name to sign in.'
23
+ # password: 'No special characters, please.'
24
+
@@ -0,0 +1,15 @@
1
+ pl:
2
+ simple_form:
3
+ "yes": 'Tak'
4
+ "no": 'Nie'
5
+ required:
6
+ text: 'wymagane'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Znaleziono błędy, prosimy poprawić:"
13
+ register:
14
+ submit: "Zarejestruj"
15
+