publinator 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
|
|
1
|
+
require_dependency "publinator/application_controller"
|
2
|
+
|
3
|
+
|
4
|
+
class StandardController < Publinator::ApplicationController
|
5
|
+
|
6
|
+
layout :current_layout
|
7
|
+
before_filter :in_a_site
|
8
|
+
|
9
|
+
def search
|
10
|
+
render :text => "Searching now..."
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
|
@@ -77,6 +77,8 @@ module Publinator
|
|
77
77
|
end
|
78
78
|
div_content.html_safe
|
79
79
|
end
|
80
|
+
rescue => e
|
81
|
+
logger.info e
|
80
82
|
end
|
81
83
|
|
82
84
|
def publishable_asset(pub, asset_type)
|
@@ -94,5 +96,10 @@ module Publinator
|
|
94
96
|
image_tag(imgs.first.asset.url(size.to_sym))
|
95
97
|
end
|
96
98
|
end
|
99
|
+
|
100
|
+
def clean_result_text(txt)
|
101
|
+
stp_txt = truncate(strip_tags(m(txt)), :length => 200)
|
102
|
+
stp_txt.gsub("'", "'").gsub("&", "&").gsub("®", "").gsub("™", "") unless stp_txt.nil?
|
103
|
+
end
|
97
104
|
end
|
98
105
|
end
|
@@ -21,6 +21,18 @@ module Publinator
|
|
21
21
|
Site.find(self.parent_id)
|
22
22
|
end
|
23
23
|
|
24
|
+
def default_url
|
25
|
+
dn = domain_names.where(:default => true).first
|
26
|
+
url = "http://"
|
27
|
+
url += "#{dn.subdomain}." unless dn.subdomain.blank?
|
28
|
+
url += "#{dn.name}"
|
29
|
+
url
|
30
|
+
end
|
31
|
+
|
32
|
+
def url(path)
|
33
|
+
"#{default_url}#{path}"
|
34
|
+
end
|
35
|
+
|
24
36
|
def publications(scope = 'published', sort = 'updated_at desc', publishable_type)
|
25
37
|
if publishable_type.nil?
|
26
38
|
pubs = Publication.for_site(self.id).send(scope).order(sort)
|
data/lib/publinator/version.rb
CHANGED
data/lib/publinator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -294,6 +294,7 @@ files:
|
|
294
294
|
- app/controllers/publinator/manage_controller.rb
|
295
295
|
- app/controllers/publinator/publishable_controller.rb
|
296
296
|
- app/controllers/publinator/section_controller.rb
|
297
|
+
- app/controllers/standard_controller.rb
|
297
298
|
- app/helpers/publinator/application_helper.rb
|
298
299
|
- app/helpers/publinator/home_helper.rb
|
299
300
|
- app/helpers/publinator/manage/publishable_types_helper.rb
|
@@ -388,7 +389,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
388
389
|
version: '0'
|
389
390
|
segments:
|
390
391
|
- 0
|
391
|
-
hash: -
|
392
|
+
hash: -915766590298524915
|
392
393
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
393
394
|
none: false
|
394
395
|
requirements:
|
@@ -397,7 +398,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
397
398
|
version: '0'
|
398
399
|
segments:
|
399
400
|
- 0
|
400
|
-
hash: -
|
401
|
+
hash: -915766590298524915
|
401
402
|
requirements: []
|
402
403
|
rubyforge_project:
|
403
404
|
rubygems_version: 1.8.24
|