web_resource module

This commit is contained in:
JiangRu committed 2015-01-06 13:46:22 +08:00
1 parent c25a3d3e92
commit 8c75aab9b2
10 files changed
+34 -13

No files matched your search

+3
View File
@@ -15,6 +15,9 @@ class WebLink
field :create_user_id
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])}
@@ -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 %>