<commit_before><% title('Poster') %>
<div class="container">
	<div class="col-md-12">
		<%= grid(@post_grid) do |g|			
			  g.column name: "Titel",attribute: "title",filter: false  do |post|			    
			    link_to(post.title,edit_council_post_path(post.council,post))
			    link_to(post.title,"#mer-"+post.id.to_s,class: "",data: {toggle: "collapse"})
			  end
			  g.column name: "Gräns",attribute: "limit",filter: false do |post|
			  	(post.limit) && (post.limit > 0) ? post.limit : "Ingen"
			  end
			
			  g.column name: "Beskrivning", attribute: "description",filter: false			  
			  g.column name: "Utskott", attribute: "council_id",filter: false do |post|
			    link_to(post.council.title,council_path(post.council))
			  end
		  
			  g.column name: "Väljs av:", attribute: "styrChoice",filter: false do |post|
			    if(post.styrChoice == true)
			    	"Styrelsen"
			    elsif(post.styrChoice == false)	
			    	"Valberedning"
			    else
			    	"Oklart"
		    	end
			  end
			  g.column name: "HT/VT?",attribute: "ht",filter: false do |post|
			  	(post.ht) ? "HT" : "VT"
			  end		  
			  if @edit
				  g.column do |post|
				    link_to('Redigera', edit_council_post_path(post.council,post))
				  end
				  g.column do |post|				  	
	        		form_tag remove_profile_council_post_path(post.council,post), :method => :patch do
						hidden_field_tag :id, post.id							
						profileList = []
						post.profiles.each do  |profile|														
							profileList << [profile.name.to_s + " - " + profile.user.username,profile.id]
						end
						select_tag :profile_id,  options_for_select(profileList)
						submit_tag 'Ta bort', class: "btn btn-u",data: { confirm: "Den valda profilen kommer att bli av med vald post."} 
					end
				  end
			  end
		end -%>
	</div>
	<div class="row">
		<%for @post in @posts%>
            <div id="mer-<%=@post.id%>" class="collapse">
                <div class="funny-boxes funny-boxes-left-orange">                	
                	<h2><%=@post.title%></h2>
                	<div class="col-md-8">
	                    <%if @post.description%><p><%=@post.description%></p><%end%>
	                    <% if current_user.has_role?(:poster,:edit) %>
					        
					         <% if @post.profiles.size > 0 %>
				        	<%= form_tag remove_profile_council_post_path(@post.council,@post), :method => :patch do%>
									<%= hidden_field_tag :id, @post.id%>							
									<% profileList = [] %>
									<% @post.profiles.each do  |profile|%>														
												<%profileList << [profile.name.to_s + " - " + profile.user.username,profile.id]%>
										<% end %>
										<%= select_tag :profile_id,  options_for_select(profileList)%>
									<%= submit_tag 'Ta bort', class: "btn btn-u",data: { confirm: "Den valda profilen kommer att bli av med vald post."} %>
									<% end %>
					        <%end%>
					        
					        	<%= form_tag add_profile_username_council_post_url(@post.council,@post), :method => :patch do%>
									<%= hidden_field_tag :id, @post.id%>
									<%= text_field_tag :username %>							
									<%= submit_tag "Spara", class: "btn-u btn",data: { confirm: 'Dubbelkollat användarnamnet?' }%>
									<%end%>
					        
					        <%end%>
	                    	                    
                    </div><commit_msg>småfix<commit_after><% title('Poster') %>
<div class="container">
	<div class="col-md-12">
		<%= grid(@post_grid) do |g|			
			  g.column name: "Titel",attribute: "title",filter: false  do |post|			    
			    link_to(post.title,edit_council_post_path(post.council,post))
			    link_to(post.title,"#mer-"+post.id.to_s,class: "",data: {toggle: "collapse"})
			  end
			  g.column name: "Gräns",attribute: "limit",filter: false do |post|
			  	(post.limit) && (post.limit > 0) ? post.limit : "Ingen"
			  end
			
			  g.column name: "Beskrivning", attribute: "description",filter: false			  
			  g.column name: "Utskott", attribute: "council_id",filter: false do |post|
			    link_to(post.council.title,council_path(post.council))
			  end
		  
			  g.column name: "Väljs av:", attribute: "styrChoice",filter: false do |post|
			    if(post.styrChoice == true)
			    	"Styrelsen"
			    elsif(post.styrChoice == false)	
			    	"Valberedning"
			    else
			    	"Oklart"
		    	end
			  end
			  g.column name: "HT/VT?",attribute: "ht",filter: false do |post|
			  	(post.ht) ? "HT" : "VT"
			  end		  
			  if @edit
				  g.column do |post|
				    link_to('Redigera', edit_council_post_path(post.council,post))
				  end
				  g.column do |post|				  	
	        		form_tag remove_profile_council_post_path(post.council,post), :method => :patch do
						hidden_field_tag :id, post.id							
						profileList = []
						post.profiles.each do  |profile|														
							profileList << [profile.name.to_s + " - " + profile.user.username,profile.id]
						end
						select_tag :profile_id,  options_for_select(profileList)
						submit_tag 'Ta bort', class: "btn btn-u",data: { confirm: "Den valda profilen kommer att bli av med vald post."} 
					end
				  end
			  end
		end -%>
	</div>
	<div class="col-md-12">
		<%for @post in @posts%>
            <div id="mer-<%=@post.id%>" class="collapse">
                <div class="funny-boxes funny-boxes-left-orange">                	
                	<h2><%=@post.title%></h2>
                	<div class="col-md-8">	                    
	                    <% if current_user.has_role?(:poster,:edit) %>					        
					         <% if @post.profiles.size > 0 %>
				        	<%= form_tag remove_profile_council_post_path(@post.council,@post), :method => :patch do%>
									<%= hidden_field_tag :id, @post.id%>							
									<% profileList = [] %>
									<% @post.profiles.each do  |profile|%>														
												<%profileList << [profile.name.to_s + " - " + profile.user.username,profile.id]%>
										<% end %>
										<%= select_tag :profile_id,  options_for_select(profileList)%>
									<%= submit_tag 'Ta bort', class: "btn btn-u",data: { confirm: "Den valda profilen kommer att bli av med vald post."} %>
									<% end %>
					        <%end%>
					        
					        	<%= form_tag add_profile_username_council_post_url(@post.council,@post), :method => :patch do%>
									<%= hidden_field_tag :id, @post.id%>
									<%= text_field_tag :username %>							
									<%= submit_tag "Spara", class: "btn-u btn",data: { confirm: 'Dubbelkollat användarnamnet?' }%>
									<%end%>
					        
					        <%end%>
	                    	                    
                    </div>
{'fraction_non_alphanumeric': 0.15300712013331313, 'fraction_numerical': 0.002423875170428723, 'mean_word_length': 2.035402298850575, 'pattern_counts': {'":': 0, '<': 82, '<?xml version=': 0, '>': 84, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5500291', 'n_tokens_mistral': 3010, 'n_tokens_neox': 2216, 'n_words': 425}