web_resource module
This commit is contained in:
parent
c25a3d3e92
commit
8c75aab9b2
|
@ -16,6 +16,9 @@ class WebLink
|
|||
field :update_user_id
|
||||
field :rss2_id, type: String
|
||||
|
||||
field :link_open, type: String
|
||||
LINK_OPEN_TYPES = ["local", "new_window"]
|
||||
|
||||
scope :can_display, ->{where(is_hidden: false).order_by([:is_top,:desc],[:created_at,:desc])}
|
||||
|
||||
before_save :add_http
|
||||
|
|
|
@ -116,6 +116,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Out Link -->
|
||||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t('web_link.type') %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :link_open, WebLink::LINK_OPEN_TYPES.map{|wl| [t("web_link.#{wl}"), wl]} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
en:
|
||||
web_resource: Web resource
|
||||
web_link: Web resource
|
||||
|
||||
web_link:
|
||||
local: Open In Current page
|
||||
new_window: Open In New window
|
||||
type: Link Open Type
|
|
@ -1,3 +1,8 @@
|
|||
zh_tw:
|
||||
web_resource: 網路資源
|
||||
web_link: 網路資源
|
||||
|
||||
web_link:
|
||||
local: 當前視窗開啟
|
||||
new_window: 新視窗開啟
|
||||
type: 開啟方式
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
require "links/engine"
|
||||
|
||||
module Links
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
require "web_resource/engine"
|
||||
|
||||
module WebResource
|
||||
end
|
|
@ -2,7 +2,7 @@ module WebResource
|
|||
class Engine < ::Rails::Engine
|
||||
initializer "web_resource" do
|
||||
OrbitApp.registration "WebResource", :type => "ModuleApp" do
|
||||
module_label "link"
|
||||
module_label "web_resource.web_resource"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
|
||||
taggable "WebLink"
|
|
@ -1,3 +1,3 @@
|
|||
module Links
|
||||
module WebResource
|
||||
VERSION = "0.0.1"
|
||||
end
|
|
@ -1,17 +1,17 @@
|
|||
$:.push File.expand_path("../lib", __FILE__)
|
||||
|
||||
# Maintain your gem's version:
|
||||
require "links/version"
|
||||
require "web_resource/version"
|
||||
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "links"
|
||||
s.version = Links::VERSION
|
||||
s.name = "web_resource"
|
||||
s.version = WebResource::VERSION
|
||||
s.authors = ["Ruling Digital"]
|
||||
s.email = ["orbit@rulingcom.com"]
|
||||
s.homepage = "http://www.rulingcom.com"
|
||||
s.summary = "Create Web Resource of Links"
|
||||
s.description = "Create a Web Resource of Links"
|
||||
s.summary = "Web Resource for orbit"
|
||||
s.description = "Web Resource for orbit"
|
||||
s.license = "MIT"
|
||||
|
||||
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
|
Loading…
Reference in New Issue