helpdesk 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
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
File without changes
@@ -1,20 +0,0 @@
1
- %div.content
2
- %div.pageContainer
3
- %h1
4
- = t('helpdesk.faqs.title_s')
5
- %ol#faq
6
- - @faqs.each do |faq|
7
- %li{:id=>"link#{faq.id}"}
8
- %h3
9
- = link_to faq.title, "\#link#{faq.id}"
10
- %div{style:"display:none"}
11
- = raw faq.text
12
-
13
- - content_for :scripts do
14
- :javascript
15
- $(document).ready(function(){
16
- $('ol#faq li h3').click(function () {
17
- $(this).parent().find('div').slideToggle('fast');
18
- });
19
- $("a[href='" + window.location.hash + "']").click();
20
- });
@@ -1,15 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.comment_by_helpdesk_confirmation.title')
3
- %p
4
- = t('helpdesk.mailer.comment_by_helpdesk_confirmation.re_ticket')
5
- = @comment.ticket.subject
6
- %p
7
- = t('helpdesk.mailer.comment_by_helpdesk_confirmation.response_content')
8
- %br
9
- = simple_format(@comment.comment)
10
- %br
11
- %p
12
- = t('helpdesk.mailer.ticket_url_title')
13
- %a{:href=>ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)}<>
14
- = ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)
15
- %br
@@ -1,19 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.comment_by_helpdesk_notification.title', user: @comment.ticket.requester.send Helpdesk.display_user.to_sym)
3
- = @comment.ticket.subject
4
-
5
- %p
6
- = t('helpdesk.mailer.comment_by_helpdesk_notification.comment_content'_
7
- %br
8
- = simple_format(@comment.comment)
9
- %br
10
- %p
11
- = t('helpdesk.mailer.ticket_url_title')
12
- %a{:href=>ticket_url(:locale=>I18n.locale, :id=>@comment.ticket, :anchor=>"comment#{@comment.id}")}<>
13
-
14
-
15
-
16
-
17
-
18
-
19
-
@@ -1,16 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.comment_by_requester_confirmation.title', user: @comment.ticket.requester.send(Helpdesk.display_user.to_sym))
3
- %p
4
- = t('helpdesk.mailer.comment_by_requester_confirmation.subject', subject: @comment.ticket.subject)
5
- %p
6
- = t('helpdesk.mailer.comment_by_requester_confirmation.comment_content')
7
- %br
8
- = simple_format(@comment.comment)
9
- %br
10
- %p
11
- = t('helpdesk.mailer.ticket_url_title')
12
- %a{:href=>ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)}<>
13
- = ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)
14
- %br
15
- = t('helpdesk.mailer.ticket_created_confirmation.info_time')
16
-
@@ -1,27 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.comment_by_requester_notification.title')
3
- = @comment.ticket.subject
4
- %p
5
- = t('helpdesk.mailer.comment_by_requester_notification.comment_content')
6
- %br
7
- = simple_format(@comment.comment)
8
- %br
9
- %br
10
- %p
11
- = t('helpdesk.mailer.ticket_created_notification.requester_info')
12
- %br
13
- = @comment.author.send Helpdesk.display_user.to_sym
14
- %br
15
- = @comment.author.send Helpdesk.display_user_uniq_info.to_sym
16
- %br
17
- %p
18
- = t('helpdesk.mailer.ticket_url_title')
19
- %a{:href=>admin_ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)}<>
20
- = admin_ticket_url(:locale=>I18n.locale, :id=>@comment.ticket)
21
-
22
-
23
-
24
-
25
-
26
-
27
-
@@ -1,16 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.ticket_created_confirmation.title', user: @ticket.requester.send(Helpdesk.display_user.to_sym) )
3
- %p
4
- = t('helpdesk.mailer.ticket_created_confirmation.subject')
5
- = @ticket.subject
6
- %p
7
- = t('helpdesk.mailer.ticket_created_confirmation.ticket_content')
8
- %br
9
- = simple_format(@ticket.description)
10
- %br
11
- %p
12
- = t('helpdesk.mailer.ticket_url_title')
13
- %a{:href=>ticket_url(:locale=>I18n.locale, :id=>@ticket)}<>
14
- = ticket_url(:locale=>I18n.locale, :id=>@ticket)
15
- %br
16
- = t('helpdesk.mailer.ticket_created_confirmation.info_time')
@@ -1,21 +0,0 @@
1
- - content_for :title do
2
- = t('helpdesk.mailer.ticket_created_notification.title')
3
- = @ticket.ticket_type.title
4
- %p
5
- = t('helpdesk.mailer.ticket_created_notification.ticket_content')
6
- %br
7
- = simple_format(@ticket.description)
8
- %br
9
- %br
10
- %p
11
- = t('helpdesk.mailer.ticket_created_notification.requester_info')
12
- %br
13
- = @ticket.requester.send Helpdesk.display_user.to_sym
14
- %br
15
- = @ticket.requester.send Helpdesk.display_user_uniq_info.to_sym
16
- %br
17
- %p
18
- = t('helpdesk.mailer.ticket_url_title')
19
- %a{:href=>admin_ticket_url(:locale=>I18n.locale, :id=>@ticket)}<>
20
- = admin_ticket_url(:locale=>I18n.locale, :id=>@ticket)
21
-
@@ -1,20 +0,0 @@
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
@@ -1,4 +0,0 @@
1
- # Globalize.fallbacks = {
2
- # :en => [:en, :pl],
3
- # :pl => [:pl, :en],
4
- # }