<commit_before>.container.well
	form.form-horizontal(name="profileForm")
		fieldset
			legend User profile
			.form-group
				label.col-md-2.control-label(for="username") Username
				.col-md-10
					input.form-control(name="username", type="text", placeholder="Username", ng-model="username", required)
			.form-group
				label.col-md-2.control-label(for="email") Email
				.col-md-10
					input.form-control(name="email", type="email", placeholder="Email", ng-model="email", required)
			.form-group
				label.col-md-2.control-label(for="password") Password
				.col-md-10
					input.form-control(name="password", type="password", placeholder="Password", ng-model="password")
			.form-group.actions
				.col-md-10.col-md-offset-2
					.pull-right
						button.btn.btn-primary(ng-click="update()", ng-disabled="profileForm.$invalid") Submit
						a.btn.btn-default(href="/") Back
.container
	.row(ng-show="suggestions.length === 0")
		h4.col-md-12 No pending suggestion yet
	.row(ng-show="suggestions.length > 0")
		.col-md-12
			h4 Your pending suggestions
			table.table.table-hover
				thead
					tr
						th Title
						th Question
						th Suggestion Date
				tbody
					tr(dir-paginate="suggestion in suggestions | itemsPerPage: 10", pagination-id="suggestions")
						td {{suggestion.title}}
						td {{suggestion.text}} : {{suggestion.answers[0].text}} or {{suggestion.answers[1].text}} ?
						td {{suggestion.published | date }}
			dir-pagination-controls(pagination-id="suggestions")
	.row(ng-show="questions.length === 0")
		h4.col-md-12 No published question yet
	.row(ng-show="questions.length > 0")
		.col-md-12
			h4 Your questions
			table.table.table-hover
				thead
					tr
						th Question
						th Upvotes
						th Answer 1
						th Answer 2
						th Publication Date
				tbody
					tr(dir-paginate="question in questions | itemsPerPage: 10", pagination-id="questions")
						td
							a(href="/questions/{{question._id}}") {{question.text}} : {{question.answers[0].text}} or {{question.answers[1].text}} ?
						td {{question.upvotes}}
						td {{question.answers[0].votes}}
						td {{question.answers[1].votes}}
						td {{question.published | date }}
			dir-pagination-controls(pagination-id="questions")
	.row(ng-show="currentUser.answers.length === 0")
		h4.col-md-12 No answered question yet
	.row(ng-show="currentUser.answers.length > 0")
		.col-md-12
			h4 Your answers
			table.table
				thead
					tr
						th Question
						th Your answer
				tbody
					tr(dir-paginate="answer in currentUser.answers | itemsPerPage: 10", pagination-id="answers")
						td {{answer.question.text}} : {{answer.question.answers[0].text}} or {{answer.question.answers[1].text}} ?
						td(ng-class="answer.answer == 0 ? 'red-background' : 'blue-background'") {{answer.question.answers[answer.answer].text}} (like {{answer.question | proportion:answer.answer}}% of the users)
			dir-pagination-controls(pagination-id="answers")<commit_msg>Add link to question page<commit_after>.container.well
	form.form-horizontal(name="profileForm")
		fieldset
			legend User profile
			.form-group
				label.col-md-2.control-label(for="username") Username
				.col-md-10
					input.form-control(name="username", type="text", placeholder="Username", ng-model="username", required)
			.form-group
				label.col-md-2.control-label(for="email") Email
				.col-md-10
					input.form-control(name="email", type="email", placeholder="Email", ng-model="email", required)
			.form-group
				label.col-md-2.control-label(for="password") Password
				.col-md-10
					input.form-control(name="password", type="password", placeholder="Password", ng-model="password")
			.form-group.actions
				.col-md-10.col-md-offset-2
					.pull-right
						button.btn.btn-primary(ng-click="update()", ng-disabled="profileForm.$invalid") Submit
						a.btn.btn-default(href="/") Back
.container
	.row(ng-show="suggestions.length === 0")
		h4.col-md-12 No pending suggestion yet
	.row(ng-show="suggestions.length > 0")
		.col-md-12
			h4 Your pending suggestions
			table.table.table-hover
				thead
					tr
						th Title
						th Question
						th Suggestion Date
				tbody
					tr(dir-paginate="suggestion in suggestions | itemsPerPage: 10", pagination-id="suggestions")
						td {{suggestion.title}}
						td {{suggestion.text}} : {{suggestion.answers[0].text}} or {{suggestion.answers[1].text}} ?
						td {{suggestion.published | date }}
			dir-pagination-controls(pagination-id="suggestions")
	.row(ng-show="questions.length === 0")
		h4.col-md-12 No published question yet
	.row(ng-show="questions.length > 0")
		.col-md-12
			h4 Your questions
			table.table.table-hover
				thead
					tr
						th Question
						th Upvotes
						th Answer 1
						th Answer 2
						th Publication Date
				tbody
					tr(dir-paginate="question in questions | itemsPerPage: 10", pagination-id="questions")
						td
							a(href="/questions/{{question._id}}") {{question.text}} : {{question.answers[0].text}} or {{question.answers[1].text}} ?
						td {{question.upvotes}}
						td {{question.answers[0].votes}}
						td {{question.answers[1].votes}}
						td {{question.published | date }}
			dir-pagination-controls(pagination-id="questions")
	.row(ng-show="currentUser.answers.length === 0")
		h4.col-md-12 No answered question yet
	.row(ng-show="currentUser.answers.length > 0")
		.col-md-12
			h4 Your answers
			table.table
				thead
					tr
						th Question
						th Your answer
				tbody
					tr(dir-paginate="answer in currentUser.answers | itemsPerPage: 10", pagination-id="answers")
						td 
							a(href="/questions/{{answer.question._id}}") {{answer.question.text}} : {{answer.question.answers[0].text}} or {{answer.question.answers[1].text}} ?
						td(ng-class="answer.answer == 0 ? 'red-background' : 'blue-background'") {{answer.question.answers[answer.answer].text}} (like {{answer.question | proportion:answer.answer}}% of the users)
			dir-pagination-controls(pagination-id="answers")
{'fraction_non_alphanumeric': 0.1596047563222241, 'fraction_numerical': 0.0177524702729861, 'mean_word_length': 3.384728340675477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4025612', 'n_tokens_mistral': 2511, 'n_tokens_neox': 1923, 'n_words': 364}