sibu 0.5.6 → 0.6.0
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 +4 -4
- data/app/controllers/sibu/documents_controller.rb +1 -1
- data/app/controllers/sibu/images_controller.rb +1 -1
- data/app/helpers/sibu/pages_helper.rb +3 -3
- data/app/models/concerns/sibu/user_concern.rb +5 -1
- data/app/models/sibu/document.rb +0 -4
- data/app/models/sibu/image.rb +0 -4
- data/lib/sibu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c359dcb1bc4d7356ca37b607246afda7665c549
|
4
|
+
data.tar.gz: e9a586994f8b165d4642235aa3408b21e93c1b05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d46a51a3509a60efd50c824f7447f1fd9bb1d2ffea7f94871100c1b3d0ad1b6b8993321d33b4544b3c9451be07ff7cf3d1922a829fb7adea90729f73d739db6
|
7
|
+
data.tar.gz: 6c9e093fc1b83ef300558d2e3a5766dc183553449ea15dd0efecbedb5d82e6c9d2e399286aeb6b1491563683d870824ea89f3197af2444778c91a88036ef2e28
|
@@ -3,7 +3,7 @@ require_dependency "sibu/application_controller"
|
|
3
3
|
module Sibu
|
4
4
|
class DocumentsController < ApplicationController
|
5
5
|
def index
|
6
|
-
@documents = Sibu::Document.
|
6
|
+
@documents = Sibu::Document.for_user(sibu_user)
|
7
7
|
end
|
8
8
|
|
9
9
|
def new
|
@@ -12,7 +12,7 @@ module Sibu
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def site_images
|
15
|
-
([Sibu::Image.empty] + Sibu::Image.
|
15
|
+
([Sibu::Image.empty] + Sibu::Image.for_user(sibu_user)).uniq
|
16
16
|
end
|
17
17
|
|
18
18
|
def available_links
|
@@ -20,13 +20,13 @@ module Sibu
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def available_docs
|
23
|
-
options_from_collection_for_select(
|
23
|
+
options_from_collection_for_select(Sibu::Document.for_user(sibu_user), :file_url, :file_name, @element["value"])
|
24
24
|
end
|
25
25
|
|
26
26
|
def link_type(val)
|
27
27
|
if val.blank? || val == '#' || /^\d+$/.match(val.to_s)
|
28
28
|
'internal'
|
29
|
-
elsif
|
29
|
+
elsif Sibu::Document.for_user(sibu_user).map {|d| d.file_url}.include?(val)
|
30
30
|
'document'
|
31
31
|
else
|
32
32
|
'external'
|
data/app/models/sibu/document.rb
CHANGED
data/app/models/sibu/image.rb
CHANGED
data/lib/sibu/version.rb
CHANGED