rich_table_component 0.0.24 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,24 +94,30 @@ module ComponentHelper
94
94
  end
95
95
 
96
96
  def button_edit_with_cancan(obj, opts = {})
97
- can?(:edit, obj) ? button_edit(obj, opts).html_safe : ''
97
+ can?(:update, obj) ? button_edit(obj, opts).html_safe : ''
98
98
  end
99
99
 
100
100
  def button_delete_with_cancan(obj, opts = {})
101
- can?(:delete, obj) ? button_delete(obj, opts).html_safe : ''
101
+ can?(:destroy, obj) ? button_delete(obj, opts).html_safe : ''
102
102
  end
103
103
 
104
104
  def button_edit_delete_with_cancan(obj, opts = {})
105
105
  [button_edit_with_cancan(obj, opts), button_delete_with_cancan(obj, opts)].join(' ').strip.html_safe
106
106
  end
107
107
 
108
-
108
+ def code_with_name(code, name, row = 1)
109
+ if row == 2
110
+ "<strong>#{code}</strong><br/>#{name}".html_safe
111
+ else
112
+ "<strong>#{code}:</strong> #{name}".html_safe
113
+ end
114
+ end
109
115
 
110
116
  def uneditable_input_control(value, label = ' ')
111
117
  content_tag :div, class: "control-group" do
112
118
  content_tag(:label, label, class: "control-label") +
113
119
  content_tag(:div, class: "controls") do
114
- content_tag(:div, value, class: "uneditable-input input-xlarge")
120
+ content_tag(:div, value, class: "uneditable-input-plain")
115
121
  end
116
122
  end
117
123
  end
@@ -121,7 +127,7 @@ module ComponentHelper
121
127
  content_tag :div, class: "control-group" do
122
128
  content_tag(:label, label, class: "control-label") +
123
129
  content_tag(:div, class: "controls") do
124
- content_tag(:div, value, class: "uneditable-textarea input-xlarge")
130
+ content_tag(:div, value, class: "uneditable-textarea-plain")
125
131
  end
126
132
  end
127
133
  end
@@ -1,8 +1,8 @@
1
1
  - rtc_controller_name ||= controller_name
2
2
  - rtc_title = true if rtc_title.nil?
3
3
 
4
- .component_title
5
- - unless rtc_title.to_s.eql?('false') || rtc_title.to_s.eql?(false)
4
+ - unless rtc_title.to_s.eql?('false') || rtc_title.to_s.eql?(false)
5
+ .component_title
6
6
  - if rtc_title.to_s.eql?('true') || rtc_title.to_s.eql?(true)
7
7
  %h1
8
8
  - if rtc_title.present? && !rtc_title.to_s.eql?('true')
@@ -1,3 +1,3 @@
1
1
  module RichTableComponent
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.26"
3
3
  end
@@ -219,7 +219,7 @@ $separator_border_right: transparentize(white, 0.1)
219
219
  .lvr_entry
220
220
  .lvr_entry_content
221
221
  overflow: hidden
222
- font-size: $main_font_size * 0.9
222
+ // font-size: $main_font_size * 0.9
223
223
  .nim_part
224
224
  font-weight: normal
225
225
  .lvr_entry_main_content
@@ -348,8 +348,8 @@ body
348
348
 
349
349
 
350
350
  .component
351
- padding-top: 10px
352
- padding-bottom: 10px
351
+ padding-top: 0px
352
+ padding-bottom: 15px
353
353
  .component_title
354
354
  font: #{$main_font_size * 2} Museo700, $display_font_family
355
355
  color: $dark_color
@@ -126,6 +126,11 @@ body { padding-top: 60px; }
126
126
  select{
127
127
  width: 272px;
128
128
  }
129
+
130
+ input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] {
131
+ width: auto;
132
+ }
133
+
129
134
  }
130
135
  .help-block{
131
136
  font-size: 9px;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_table_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-19 00:00:00.000000000 Z
12
+ date: 2013-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails