chris tags update
This commit is contained in:
1 parent
2945e14385
commit
d047a3d62a
102 files changed
+3111
-378
No files matched your search
Vendored
+4
-9
@@ -34,7 +34,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||
|
||||
@archive_files = (params[:sort] || @filter) ? get_sorted_and_filtered("archive_file",:archive_file_category_id.in => @archive_file_category_ids) : get_viewable("archive_file",:archive_file_category_id.in => @archive_file_category_ids)
|
||||
|
||||
get_tags
|
||||
@tags = get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
@@ -59,7 +59,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||
def new
|
||||
@archive_file = ArchiveFile.new
|
||||
|
||||
get_tags
|
||||
@tags = get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
@@ -71,7 +71,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||
def edit
|
||||
@archive_file = ArchiveFile.find(params[:id])
|
||||
|
||||
get_tags
|
||||
@tags = get_tags
|
||||
end
|
||||
|
||||
# POST /archive_files
|
||||
@@ -86,7 +86,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||
format.html { redirect_to(panel_archive_back_end_archive_files_url) }
|
||||
format.xml { render :xml => @archive_file, :status => :created, :location => @archive_file }
|
||||
else
|
||||
get_tags
|
||||
@tags = get_tags
|
||||
format.html { render :action => "new" }
|
||||
format.xml { render :xml => @archive_file.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
@@ -139,9 +139,4 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||
# @archive_file_categorys = (id ? ArchiveFileCategory.find(id).to_a : ArchiveFileCategory.excludes('disabled' => true))
|
||||
# end
|
||||
|
||||
def get_tags
|
||||
module_app = ModuleApp.first(:conditions => {:key => 'archive'})
|
||||
@tags = Tag.all(:conditions => {:module_app_id => module_app.id})
|
||||
end
|
||||
|
||||
end
|
||||
@@ -10,9 +10,12 @@ class ArchiveFile
|
||||
|
||||
PAYMENT_TYPES = @site_valid_locales
|
||||
|
||||
include OrbitTag::Taggable
|
||||
taggable
|
||||
|
||||
field :title, localize: true
|
||||
|
||||
has_and_belongs_to_many :tags, :class_name => "ArchiveTag"
|
||||
# has_and_belongs_to_many :tags, :class_name => "ArchiveTag"
|
||||
|
||||
field :create_user_id
|
||||
field :update_user_id
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
<% archive_file.sorted_tags.each do |tag| %>
|
||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||
<span class="label label-tags"><%= tag.name %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_tags.html.erb
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
||||
<% @tags.each do |tag| -%>
|
||||
<%= link_to tag[I18n.locale], panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %>
|
||||
<%= link_to tag.name, panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %>
|
||||
<% end -%>
|
||||
</div>
|
||||
<%= render :partial => 'clear_filters', :locals => {:type => 'tags'} %>
|
||||
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @tags.each do |tag| %>
|
||||
<%= check_box_tag 'archive_file[tag_ids][]', tag.id, @archive_file.tag_ids.include?(tag.id)%>
|
||||
<%= tag[I18n.locale] %>
|
||||
<%= tag.name %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
<li>
|
||||
<%= link_to tag[I18n.locale], panel_announcement_widget_bulletins_and_web_links_path(:id => tag.id), :remote => true, :class => ('active' if tag.eql?(@selected_tag)) %>
|
||||
<%= link_to tag.name, panel_announcement_widget_bulletins_and_web_links_path(:id => tag.id), :remote => true, :class => ('active' if tag.eql?(@selected_tag)) %>
|
||||
</li>
|
||||
vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_list.html.erb
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
<div class="tag_block">
|
||||
<ul class="tag_list">
|
||||
<% @tags.each do |tag| %>
|
||||
<li><%= tag[I18n.locale] %></li>
|
||||
<li><%= tag.name %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ module Archive
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'tags',
|
||||
:link_path=>"panel_archive_back_end_tags_path" ,
|
||||
:link_path=>"admin_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Archive'}))" ,
|
||||
:priority=>4,
|
||||
# :active_for_action=>{:bulletin_categorys=>:index},
|
||||
:available_for => [:admin]
|
||||
|
||||
Reference in new issue
Block a user