Merge branch 'master' into 'master'
fix auto multiple creating tag problem See merge request !9
This commit is contained in:
commit
1ae7ff6d19
|
@ -21,7 +21,24 @@ class Admin::GalleriesController < OrbitAdminController
|
|||
tag1.save
|
||||
tags << tag0
|
||||
tags << tag1
|
||||
elsif find_tag.length>1
|
||||
show_tags = Tag.all.select{|value| value.name==I18n.t('gallery.show_desc')}
|
||||
show_tags.each_with_index do |show_tag,index1|
|
||||
if index1>0
|
||||
if show_tag.taggings.count==0
|
||||
show_tag.delete
|
||||
end
|
||||
end
|
||||
end
|
||||
find_tag.each_with_index do |not_show_tag,index1|
|
||||
if index1>0
|
||||
if not_show_tag.taggings.count==0
|
||||
not_show_tag.delete
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def save_crop
|
||||
begin
|
||||
images = AlbumImage.all.select{|value| params[:id].include? value.id.to_s}
|
||||
|
|
|
@ -16,6 +16,22 @@ class GalleriesController < ApplicationController
|
|||
tag1.save
|
||||
tags << tag0
|
||||
tags << tag1
|
||||
elsif find_tag.length>1
|
||||
show_tags = Tag.all.select{|value| value.name==I18n.t('gallery.show_desc')}
|
||||
show_tags.each_with_index do |show_tag,index1|
|
||||
if index1>0
|
||||
if show_tag.taggings.count==0
|
||||
show_tag.delete
|
||||
end
|
||||
end
|
||||
end
|
||||
find_tag.each_with_index do |not_show_tag,index1|
|
||||
if index1>0
|
||||
if not_show_tag.taggings.count==0
|
||||
not_show_tag.delete
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div id="view-photo-tags" class="nano" style="display:none">
|
||||
<div class="content">
|
||||
<form>
|
||||
<fieldset>
|
||||
<fieldset style="display: contents;">
|
||||
<legend>Tags</legend>
|
||||
<ul class="tags-groups">
|
||||
<% @tags.each do |tag| %>
|
||||
|
|
Loading…
Reference in New Issue