file_share 0.1.7 → 0.1.8
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.8
|
@@ -3,13 +3,6 @@ module FileShare
|
|
3
3
|
def link_wrapper(path, wrapper_options={}, link_options={})
|
4
4
|
tag = wrapper_options.delete(:tag) || :p
|
5
5
|
link_text = link_options.delete(:link_text) || path
|
6
|
-
highlight = wrapper_options.delete(:highlight)
|
7
|
-
|
8
|
-
unless path.blank?
|
9
|
-
if current_page?(path) && (highlight.nil? || highlight)
|
10
|
-
wrapper_options = {:class => (wrapper_options[:class] || '') + " nav_highlight"}
|
11
|
-
end
|
12
|
-
end
|
13
6
|
|
14
7
|
unless wrapper_options.delete(:no_wrapper)
|
15
8
|
return content_tag(tag, wrapper_options) do
|
@@ -76,12 +69,12 @@ module FileShare
|
|
76
69
|
|
77
70
|
def link_to_attachable_or_file_attachments(attachable, wrapper_options={}, link_options={})
|
78
71
|
unless attachable.blank?
|
79
|
-
return link_to_attachable(attachable
|
72
|
+
return link_to_attachable(attachable, {
|
80
73
|
:no_wrapper => false
|
81
74
|
}, {
|
82
75
|
:link_text => '< back',
|
83
76
|
:class => 'fake_button'
|
84
|
-
}
|
77
|
+
})
|
85
78
|
else
|
86
79
|
return link_to_file_attachments({}, {
|
87
80
|
:link_text => '< back',
|
@@ -4,12 +4,19 @@
|
|
4
4
|
<%= semantic_form_for @file_attachment do |form| %>
|
5
5
|
<%= form.inputs do %>
|
6
6
|
<%= form.input :name, :hint => 'something memorable' %>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
<li id="file_attachment_container_input" class="select required">
|
8
|
+
<label for="file_attachment_container">
|
9
|
+
<%= FileContainer.types.join(' / ')%>
|
10
|
+
</label>
|
11
|
+
<select id="file_container_select" name="file_attachment[file_container]">
|
12
|
+
<%= render({
|
13
|
+
:partial => 'file_container_select',
|
14
|
+
:locals => {
|
15
|
+
:selected => "#{@file_attachment.attachable_type}_#{@file_attachment.attachable_id}"
|
16
|
+
}
|
17
|
+
}) %>
|
18
|
+
</select>
|
19
|
+
</li>
|
13
20
|
<%= form.input :description, :hint => "of file contents, purpose, etc" %>
|
14
21
|
<% end %>
|
15
22
|
<%= form.buttons %>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_share
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason LaPier
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-02-08 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|