helpdesk 0.0.20 → 0.0.25

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c06e151a2b309e2e7638027643791b305bea162
4
- data.tar.gz: 64749502ac0b65a9084953eb41c527f0bc1799e5
3
+ metadata.gz: a7c264b1d4f7d74f09eaeb46e1654052b1572d2e
4
+ data.tar.gz: 19894c8b1ab76fb70efb83b70c1f561c1ec00b28
5
5
  SHA512:
6
- metadata.gz: 1619c60b75d9f06027bc8bf47db24e1c7490dfc9e6fe6ee33ec8bd8c0e4e2ee43be875beb8a19cef1aca360b162de2032befcd5df289c25669bac681c4819f28
7
- data.tar.gz: 29b82d23b895834502a5f524564e684a768082c98f1ebab815dd21aebef852a6659eed0f5d7a4fcf527153fd214158985c9e1d522ea17fa4910f3fbae9a171e8
6
+ metadata.gz: e96da624d0673c09ca321bf67cc82c431e406a2c66ced324ef60f512c4ee5909269d95368e1d7c0b4d822a870418e12357002244c7a1c9336ad8efbe0de21e41
7
+ data.tar.gz: 58d8aca728fc2890ac71c618d725f46378503a227c19a9ddfc18975e8f5b12f055a47ad228693bc95aa063d94bf4392ead607fc7eafd99d5cba81b17fd21a18a
@@ -47,6 +47,6 @@ class Helpdesk::Admin::TicketTypesController < Helpdesk::Admin::BaseController
47
47
  private
48
48
 
49
49
  def ticket_type_params
50
- params.require(:ticket_type).permit(:active,:position,:title,:tr_class. translations_attributes:[:title])
50
+ params.require(:ticket_type).permit(:active,:position,:title,:tr_class,translations_attributes:[:title])
51
51
  end
52
52
  end
@@ -8,10 +8,8 @@ module Helpdesk
8
8
  def index
9
9
  if params[:tickets] == 'closed'
10
10
  @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).closed.page(params[:page])
11
- @tickets_count = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.count
12
11
  else
13
12
  @tickets = Helpdesk::Ticket.where(:requester_id => helpdesk_user.id).active.page(params[:page])
14
- @tickets_count = @tickets.size
15
13
  end
16
14
 
17
15
 
@@ -69,9 +67,7 @@ module Helpdesk
69
67
 
70
68
  respond_to do |format|
71
69
  if @ticket.update_attributes(ticket_params)
72
- puts ticket_params
73
- puts paramsp
74
- format.html { redirect_to @ticket, notice: 'Ticket was successfully updated.' }
70
+ format.html { redirect_to @ticket, notice: 'Ticket was successfully updated.'}
75
71
  format.json { head :no_content }
76
72
  else
77
73
  format.html { render action: "edit" }
@@ -6,7 +6,6 @@ module Helpdesk
6
6
  panel_menu(title,'default',&block)
7
7
  end
8
8
 
9
-
10
9
  def panel_menu(title,type,&block)
11
10
  content_tag(:div,class: "panel panel-#{type}") do
12
11
  content_tag(:div ,class: 'panel-heading') do
@@ -18,19 +17,6 @@ module Helpdesk
18
17
  end
19
18
  end
20
19
 
21
-
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
- end
30
- end
31
- end
32
-
33
-
34
20
  def menu_li(lbl, path, *args)
35
21
  options = args.extract_options!
36
22
  (options[:class].nil? ? options.merge!(:class => "active") : options[:class] += " active" ) if url_for(path) == request.fullpath
@@ -2,7 +2,6 @@ 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
6
5
 
7
6
  default_scope order('position ASC').includes(:translations)
8
7
 
@@ -1,6 +1,5 @@
1
1
  module Helpdesk
2
2
  class Subscriber < ActiveRecord::Base
3
- attr_accessible :confirmed, :email, :hashcode, :lang, :name
4
3
  scope :confirmed, where('confirmed = ? ',true)
5
4
  scope :unconfirmed, where('confirmed = ? ',false)
6
5
 
@@ -2,7 +2,6 @@ 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
6
5
 
7
6
  default_scope ->{order('position ASC')}
8
7
 
@@ -1,10 +1,10 @@
1
1
  - content_for :left do
2
2
  = menu_left t('helpdesk.tickets.title') do
3
-
3
+
4
4
  = menu_li ico('pencil') + t('helpdesk.new_ticket'), new_ticket_url
5
5
 
6
6
  %li.divider
7
7
 
8
8
 
9
- = menu_li ico('bullhorn') + "#{t('helpdesk.tickets.active')} (#{@tickets_count})", tickets_url(:tickets => 'active')
9
+ = menu_li ico('bullhorn') + "#{t('helpdesk.tickets.active')}", tickets_url(:tickets => 'active')
10
10
  = menu_li ico('hdd') + "#{t('helpdesk.tickets.closed')}", tickets_url(:tickets => 'closed')
@@ -1,9 +1,9 @@
1
1
  - content_for :title do
2
2
  -if params[:tickets] && params[:tickets] == 'closed'
3
3
  = t('helpdesk.tickets.closed')
4
-
5
4
  -else
6
5
  = t('helpdesk.tickets.active')
6
+ ="(#{@tickets.total_count})"
7
7
 
8
8
 
9
9
  = render 'menu'
@@ -2,7 +2,7 @@ class CreateHelpdeskTicketTypes < ActiveRecord::Migration
2
2
  def up
3
3
  create_table :helpdesk_ticket_types do |t|
4
4
  t.integer :position
5
- t.boolean :active,:default=>1,:null=>false
5
+ t.boolean :active,:default=>true,:null=>false
6
6
  t.string :tr_class
7
7
  t.timestamps
8
8
  end
@@ -2,7 +2,7 @@ class CreateHelpdeskFaqs < ActiveRecord::Migration
2
2
  def up
3
3
  create_table :helpdesk_faqs do |t|
4
4
  t.integer :position
5
- t.boolean :active,:default=>0,:null=>false
5
+ t.boolean :active,:default=>false,:null=>false
6
6
 
7
7
  t.timestamps
8
8
  end
@@ -5,8 +5,8 @@ class CreateHelpdeskSubscribers < ActiveRecord::Migration
5
5
  t.string :email
6
6
  t.string :lang
7
7
  t.string :hashcode
8
- t.boolean :confirmed,:default=>0,:null=>false
9
-
8
+ t.boolean :confirmed,:default=>false,:null=>false
9
+
10
10
  t.timestamps
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module Helpdesk
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpdesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Beynon Wacław Łuczak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: launchy