tawork 0.0.33 → 0.0.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTI1MWUwYTliNTRiNzAxMTY5YjMxYWY4ZGFkM2EwOTdjNjk5OTFkNg==
4
+ Y2FjN2M5ZTQ2MWNhNDBhMjg0Y2M0MWVkMDBlZjFiZmM3YTIyYzllZQ==
5
5
  data.tar.gz: !binary |-
6
- ZmE4NjNjODAxYjJiNjZlYmM4OTAxYWY3YmY1YjQ2MjQ1MDdhZDY1ZQ==
6
+ YjdiZjQ0OGUwZjM0Y2ExMDA5OGUzZDhkZWI3NmZkYmQ1ZDQ3NjAwMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjdjNWVkZDM5YmY2NDNkYjZmZjYzOGNmYThkMzNkMzliMzYzMDkwYmVjZDE1
10
- MDJhMzZjNzU1NmQxNjJmYjE3ZDZiZWM3MjQ3N2I0ZGQwNTQyMTM5MjQwNmM0
11
- NmZmNTM4MjIzZTkxMGQ4NGVmMzY3ZTc5NjYwZDI4NTk1YzIxYzM=
9
+ YjZjOWE3NGYwMWMxYzcxMzM4MGJjOGRhOGI3ZjNjYWM1NTBjZjBjYmUxZTBk
10
+ M2ZkNGI3MWU3ZTUzN2FhZmE5MmJmYWFjOTFlZTk0ZmEyNjg5M2YwODJiMzEz
11
+ ZTM3MjQwNmViOWJkNmZkODRiMjU0ODllNmE0NTU0MGY5NWQ2MzY=
12
12
  data.tar.gz: !binary |-
13
- MzJlNWRiNTkyMjI2YjFlMmIyZWMyMTlkMGU0Zjg3MmM3ZmJiNTRiZjA5OTQw
14
- Mzk3ODcxYWE3NDA0MjEzYzExNDEwMzkzOGI4ZDk4Y2EzZmJlYzYwMDc0MTJi
15
- YjRjNmQ1NGJiZTgyNTczZThkM2Y0NWQ1OTc4ZTM1OTgyNGRhMzc=
13
+ YTllMGUzMjVjZmI3MzdkOGE5NDZmZDJiZTM0ZTg4YWJkODg0OTUxZDk0YjIy
14
+ MjdiYzkzODVkZTMwNTEyMzMxNjI3ODU1ZDBlYzNkMjVlMTY1MDE2ZThiYzlj
15
+ YzAxMGRkNjA1NTg5NzE0ZThhODM2NWE3YmY1NmI0OGVlMDQyNjI=
@@ -1,35 +1,2 @@
1
1
  module ApplicationHelper
2
- [:project, :story, :bug, :task].each do |method|
3
- define_method("#{method}_path") do |*args|
4
- ticket_path(*args)
5
- end
6
-
7
- define_method("#{method.to_s.pluralize}_path") do |*args|
8
- tickets_path(*args)
9
- end
10
- end
11
-
12
- def ticket_types
13
- Ticket::ALLOWED_TYPES.each_with_object({}) do |type, hash|
14
- hash[type] = Ticket.filtered_type_class(type).new(
15
- creator: current_user,
16
- parent_id: params[:parent_id]
17
- )
18
- end
19
- end
20
-
21
- def title(page_title)
22
- content_for(:title) { page_title }
23
- end
24
-
25
- def icon_for(thing)
26
- case thing
27
- when Space
28
- icon = "bullseye"
29
- when Page
30
- icon = "file"
31
- end
32
-
33
- tag(:i, class: "fa fa-#{icon}")
34
- end
35
2
  end
@@ -0,0 +1,37 @@
1
+ module Tawork
2
+ module ApplicationHelper
3
+ [:project, :story, :bug, :task].each do |method|
4
+ define_method("#{method}_path") do |*args|
5
+ ticket_path(*args)
6
+ end
7
+
8
+ define_method("#{method.to_s.pluralize}_path") do |*args|
9
+ tickets_path(*args)
10
+ end
11
+ end
12
+
13
+ def ticket_types
14
+ Ticket::ALLOWED_TYPES.each_with_object({}) do |type, hash|
15
+ hash[type] = Ticket.filtered_type_class(type).new(
16
+ creator: current_user,
17
+ parent_id: params[:parent_id]
18
+ )
19
+ end
20
+ end
21
+
22
+ def title(page_title)
23
+ content_for(:title) { page_title }
24
+ end
25
+
26
+ def icon_for(thing)
27
+ case thing
28
+ when Space
29
+ icon = "bullseye"
30
+ when Page
31
+ icon = "file"
32
+ end
33
+
34
+ tag(:i, class: "fa fa-#{icon}")
35
+ end
36
+ end
37
+ end
@@ -1,13 +1,4 @@
1
1
  = link_to wiki_page_path(result.attachable) do
2
- = icon_for ancestor
2
+ = icon_for result.attachable
3
3
  = result.filename
4
4
  = render 'search_trail', node: result.attachable, with_node: true
5
-
6
- .search-trail
7
- - if !result.attachable.is_a?(Space)
8
- ||  
9
- %i.fa.fa-file
10
- = result.attachable.title
11
- ||  
12
- %i.fa.fa-bullseye
13
- = result.attachable.root.title
@@ -1,5 +1,10 @@
1
+ - with_node ||= false
1
2
  .search-trail
2
3
  - node.ancestors.each do |ancestor|
3
- ||  
4
+ ||
4
5
  = icon_for ancestor
5
6
  = ancestor.title
7
+ - if with_node
8
+ ||
9
+ = icon_for node
10
+ = node.title
@@ -1,3 +1,3 @@
1
1
  module Tawork
2
- VERSION = '0.0.33'
2
+ VERSION = '0.0.34'
3
3
  end
data/tawork.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.description = "Wiki and Tickets"
15
15
  s.license = "MIT"
16
16
 
17
- s.files = `git ls-files`.split($/).reject{|x| x =~ /^bin/ }
17
+ s.files = `git ls-files`.split($/)
18
18
  s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
19
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tawork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adnan Ali
@@ -75,6 +75,7 @@ files:
75
75
  - app/controllers/wiki/spaces_controller.rb
76
76
  - app/controllers/work/users_controller.rb
77
77
  - app/helpers/application_helper.rb
78
+ - app/helpers/tawork/application_helper.rb
78
79
  - app/helpers/wiki/pages_helper.rb
79
80
  - app/inputs/fake_input.rb
80
81
  - app/mailers/.keep