desktop-finder 0.0.1.7 → 0.0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Desktop
2
2
  module Finder
3
- VERSION = "0.0.1.7"
3
+ VERSION = "0.0.1.8"
4
4
  end
5
5
  end
@@ -1,6 +1,4 @@
1
1
  require "desktop/finder/version"
2
- require "action_view/helpers/tag_helper"
3
- require "action_support/core_ext"
4
2
 
5
3
  module Desktop
6
4
  class Finder
@@ -69,6 +67,28 @@ module Desktop
69
67
  where = params.reject{|p,v| p=='controller' or p=='action' or p=='search' or p=='commit' or v.empty?}
70
68
  where
71
69
  end
70
+
71
+ def submit_tag(label, options)
72
+ "<input type=\"button\" value='#{label}' class='#{options[:class]}' onclick='this.parent(\"form\").submit();' />"
73
+ end
74
+
75
+ def text_field_tag(name, value, options)
76
+ "<input type='text' name='#{name}' value='#{value}' class='#{options[:class]}' />"
77
+ end
78
+
79
+ def select_tag(name, options, value)
80
+ s = "<select name=\"#{name}\">"
81
+ options.each do|p|
82
+ s << '<option value='+ p.fetch(0) +'>' + p.many? ? p.fetch(1) : p.fetch(0) + '</option>'
83
+ end
84
+ s << '</select>'
85
+ s
86
+ end
87
+
88
+ def label_tag(id, label, options)
89
+ "<label class='#{options[:class]}'>#{label}</label>"
90
+ end
91
+
72
92
  end
73
93
  end
74
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desktop-finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.7
4
+ version: 0.0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: