fix with what ray needs for the fact_check form
This commit is contained in:
		
							parent
							
								
									3ba89ecbcf
								
							
						
					
					
						commit
						97adf94e15
					
				|  | @ -14,11 +14,37 @@ | ||||||
| 		  <%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %> | 		  <%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %> | ||||||
| 		<%= f.text_field :not_checked_reason %> | 		<%= f.text_field :not_checked_reason %> | ||||||
| 	</div> | 	</div> | ||||||
|    | 
 | ||||||
| 	<!--Widget start--> | 	<!--Widget start--> | ||||||
|  | 	<%= f.error_messages %> | ||||||
| 	 | 	 | ||||||
| 	<div id="sub-wiget"> | 	<div id="sub-wiget"> | ||||||
| 		 | 		<div id="widget-audit" class="widget-box"> | ||||||
|  | 			<div class="widget-action clear"> | ||||||
|  | 				<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a> | ||||||
|  | 			</div> | ||||||
|  | 			<h3 class="widget-title"><i class="icons-link icons-white"></i>Audit</h3> | ||||||
|  | 			<div class="widget-content"> | ||||||
|  | 				<% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin?%> | ||||||
|  | 					<div class="controls"> | ||||||
|  | 						<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %> | ||||||
|  | 						<%= content_tag :label,:class => "radio inline" do -%> | ||||||
|  | 							<%= f.radio_button :is_checked, true , {:class => 'privacy'} %>  | ||||||
|  | 							<%= t('announcement.bulletin.fact_check_pass') %> | ||||||
|  | 						<% end -%> | ||||||
|  | 						<%= content_tag :label,:class => "radio inline" do -%> | ||||||
|  | 							<%= f.radio_button :is_checked, false, (@bulletin.is_checked.nil?? {:checked => true, :class => 'privacy'} : {})%>  | ||||||
|  | 							<%= t('announcement.bulletin.fact_check_not_pass') %> | ||||||
|  | 						<% end -%> | ||||||
|  | 						<div class="select-role"> | ||||||
|  | 							<%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %> | ||||||
|  | 						    <%= f.text_field :not_checked_reason %> | ||||||
|  | 						</div> | ||||||
|  | 						 | ||||||
|  | 					</div> | ||||||
|  | 				<% end %> | ||||||
|  | 			</div> | ||||||
|  | 		</div> | ||||||
| 		<div id="widget-picture" class="widget-box widget-size-300"> | 		<div id="widget-picture" class="widget-box widget-size-300"> | ||||||
| 			<div class="widget-action clear"> | 			<div class="widget-action clear"> | ||||||
| 				<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a> | 				<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a> | ||||||
|  | @ -102,24 +128,36 @@ | ||||||
| 
 | 
 | ||||||
| 	<div id="post-body"> | 	<div id="post-body"> | ||||||
| 		<div id="post-body-content" class="clear"> | 		<div id="post-body-content" class="clear"> | ||||||
|  | 			 | ||||||
|  | 			<div class="field"> | ||||||
|  | 				<%= f.label :image, t('announcement.image') %><br /> | ||||||
|  | 				<%= f.file_field :image %> | ||||||
|  | 				<% if @bulletin.image.file %> | ||||||
|  | 				<%= check_box_tag 'bulletin[image_del]' %> | ||||||
|  | 				<%= t('announcement.刪除已上傳檔案') %> | ||||||
|  | 				<% end %> | ||||||
|  | 			</div> | ||||||
| 		 | 		 | ||||||
| 			<%= f.label :category %> | 			<%= f.label :category %> | ||||||
| 			<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> | 			<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> | ||||||
| 
 | 
 | ||||||
| 			<div class="btn-group pull-right"> | 			<ul class="nav nav-tabs"> | ||||||
| 				<a class="btn dropdown-toggle" href="#" data-toggle="dropdown"> | 			    <li class="active"><a data-toggle="tab" href="#chinese">Chinese</a></li> | ||||||
| 					English | 			    <li><a data-toggle="tab" href="#english">English</a></li> | ||||||
| 					<span class="caret"></span> | 			</ul> | ||||||
| 				</a> | 			<div class="tab-content"> | ||||||
| 				<ul class="dropdown-menu"> | 				<div id="chinese" class="tab-pane active"> | ||||||
| 					<li><a href="#">English</a></li> | 					<div class="title"> | ||||||
| 					<li><a href="#">Chinese</a></li> | 						<input type="text" placeholder="輸入標題" class="post-title"> | ||||||
| 					<li><a href="#">Japanese</a></li> | 					</div> | ||||||
| 					<li><a href="#">French</a></li> | 				</div> | ||||||
| 					<li><a href="#">German</a></li> | 				<div id="english" class="tab-pane"> | ||||||
| 					<!--<li class="divider"></li> | 					<div class="title"> | ||||||
| 					<li><a href="#">Separated link</a></li>--> | 						<input type="text" placeholder="Enter title here" class="post-title"> | ||||||
| 				</ul> | 					</div> | ||||||
|  | 					<div class="editor"></div> | ||||||
|  | 					<div class="editor"></div> | ||||||
|  | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
| 
 | 
 | ||||||
| 			<div class="title"> | 			<div class="title"> | ||||||
|  | @ -127,14 +165,14 @@ | ||||||
| 				<%= f.fields_for :title, (@bulletin.new_record? ? @bulletin.build_title : @bulletin.title ) do |f| %> | 				<%= f.fields_for :title, (@bulletin.new_record? ? @bulletin.build_title : @bulletin.title ) do |f| %> | ||||||
| 				  <% @site_valid_locales.each do |locale| %> | 				  <% @site_valid_locales.each do |locale| %> | ||||||
| 					<td> | 					<td> | ||||||
| 							<%= I18nVariable.from_locale(locale) %> | 						<%= I18nVariable.from_locale(locale) %> | ||||||
| 							<%= f.text_field locale, :class=>'post-title' %> | 						<%= f.text_field locale, :class=>'post-title' %> | ||||||
| 						</td> | 					</td> | ||||||
| 				  <% end %> | 				  <% end %> | ||||||
| 				<% end %> | 				<% end %> | ||||||
| 			</div>	 | 			</div> | ||||||
| 
 | 
 | ||||||
| 			<div class="title"> | 			<div class="editor"> | ||||||
| 				<%= f.label :subtitle %> | 				<%= f.label :subtitle %> | ||||||
| 				<%= f.fields_for :subtitle, (@bulletin.new_record? ? @bulletin.build_subtitle : @bulletin.subtitle ) do |f| %> | 				<%= f.fields_for :subtitle, (@bulletin.new_record? ? @bulletin.build_subtitle : @bulletin.subtitle ) do |f| %> | ||||||
| 					<% @site_valid_locales.each do |locale| %> | 					<% @site_valid_locales.each do |locale| %> | ||||||
|  | @ -146,7 +184,7 @@ | ||||||
| 				<% end %> | 				<% end %> | ||||||
| 			</div>   | 			</div>   | ||||||
| 
 | 
 | ||||||
| 			<div class="title"> | 			<div class="editor"> | ||||||
| 				<%= f.label :text %> | 				<%= f.label :text %> | ||||||
| 				<%= f.fields_for :text, (@bulletin.new_record? ? @bulletin.build_text : @bulletin.text ) do |f| %> | 				<%= f.fields_for :text, (@bulletin.new_record? ? @bulletin.build_text : @bulletin.text ) do |f| %> | ||||||
| 					<% @site_valid_locales.each do |locale| %> | 					<% @site_valid_locales.each do |locale| %> | ||||||
|  | @ -158,7 +196,6 @@ | ||||||
| 				<% end %> | 				<% end %> | ||||||
| 			</div> | 			</div> | ||||||
| 			 | 			 | ||||||
| 
 |  | ||||||
| 			<div class="main-wiget"> | 			<div class="main-wiget"> | ||||||
| 				<div id="widget-link" class="widget-box"> | 				<div id="widget-link" class="widget-box"> | ||||||
| 					<div class="widget-action clear"> | 					<div class="widget-action clear"> | ||||||
|  | @ -176,6 +213,7 @@ | ||||||
| 								<% @site_valid_locales.each do |locale| %> | 								<% @site_valid_locales.each do |locale| %> | ||||||
| 								<div class="control-group"> | 								<div class="control-group"> | ||||||
| 									<th>Name - <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th> | 									<th>Name - <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th> | ||||||
|  | 								</div> | ||||||
| 								<% end %> | 								<% end %> | ||||||
| 								<th class="span1"></th> | 								<th class="span1"></th> | ||||||
| 							</tr> | 							</tr> | ||||||
|  | @ -207,10 +245,6 @@ | ||||||
| 							 | 							 | ||||||
| 					</div> | 					</div> | ||||||
| 				</div> | 				</div> | ||||||
| 			</div>	 |  | ||||||
| 		   |  | ||||||
| 
 |  | ||||||
| 			<div class="main-wiget"> |  | ||||||
| 				<div id="widget-file" class="widget-box"> | 				<div id="widget-file" class="widget-box"> | ||||||
| 					<div class="widget-action clear"> | 					<div class="widget-action clear"> | ||||||
| 						<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a> | 						<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a> | ||||||
|  | @ -257,10 +291,10 @@ | ||||||
| 				</div> | 				</div> | ||||||
| 			</div>		 | 			</div>		 | ||||||
| 	 | 	 | ||||||
| 	</div>		 | 		</div> | ||||||
| 	 |  | ||||||
| 	<!--Post End--> | 	<!--Post End--> | ||||||
|    | 	</div> | ||||||
|  | 
 | ||||||
| 	  <div class="form-actions"> | 	  <div class="form-actions"> | ||||||
| 		<%= f.submit t('submit'), :class=>'btn btn-primary' %> | 		<%= f.submit t('submit'), :class=>'btn btn-primary' %> | ||||||
| 		<%= link_to t('cancel'), get_go_back, :class=>"btn" %>  | 		<%= link_to t('cancel'), get_go_back, :class=>"btn" %>  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue