fix multi-tag display error and url_to_edit
This commit is contained in:
		
							parent
							
								
									423326d67c
								
							
						
					
					
						commit
						12c5cdbfe4
					
				|  | @ -37,8 +37,18 @@ class ArchivesController < ApplicationController | |||
| 						"files" => files | ||||
| 					} | ||||
| 				end | ||||
| 
 | ||||
| 				tag_name = "" | ||||
| 				 | ||||
| 				if(!t.nil?) | ||||
| 					t.each do |item| | ||||
| 						tag_name += item.name + " + " | ||||
| 					end | ||||
| 				end | ||||
| 				tag_name = (tag_name[0...-2] rescue "") | ||||
| 
 | ||||
| 				{ | ||||
| 					"tag-name" => (t[0].name rescue ""), | ||||
| 					"tag-name" => tag_name, | ||||
| 					"archives" => archives | ||||
| 
 | ||||
| 				} | ||||
|  | @ -54,7 +64,7 @@ class ArchivesController < ApplicationController | |||
| 				{ | ||||
| 					"category-title" => cat.title || "", | ||||
| 					"tags" => ts, | ||||
| 					"link_to_edit" => url_to_edit | ||||
| 					"url_to_edit" => url_to_edit | ||||
| 					 | ||||
| 				} | ||||
| 			end | ||||
|  | @ -91,8 +101,17 @@ class ArchivesController < ApplicationController | |||
| 						"archive_url" => OrbitHelper.widget_more_url | ||||
| 					} | ||||
| 				end | ||||
| 				tag_name = "" | ||||
| 				 | ||||
| 				if(!t.nil?) | ||||
| 					t.each do |item| | ||||
| 						tag_name += item.name + " + " | ||||
| 					end | ||||
| 				end | ||||
| 				tag_name = (tag_name[0...-2] rescue "") | ||||
| 
 | ||||
| 				{ | ||||
| 					"tag-name" => (t[0].name rescue ""), | ||||
| 					"tag-name" => tag_name, | ||||
| 					"archives" => archives | ||||
| 
 | ||||
| 				} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue