<commit_before>// Documents list and user data

'use strict';

var curry              = require('es5-ext/function/#/curry')
  , nextTick           = require('next-tick')
  , _                  = require('mano').i18n.bind('User Submitted')
  , formatLastModified = require('./utils/last-modified')
  , scrollBottom       = require('./utils/scroll-to-bottom');

module.exports = function (context/*, options */) {
	var options = Object(arguments[1])
	  , businessProcess = context.businessProcess
	  , urlPrefix = options.urlPrefix || '/', scrollableElem;

	return [section(
		{ class: 'submitted-main table-responsive-container' },
		table(
			{ class: 'submitted-user-data-table submitted-current-user-data-table', responsive: true },
			thead(
				tr(
					th(_("Entity")),
					th(_("Service")),
					th(_("Submission date")),
					th(_("Withdraw date")),
					th(_("Inscriptions and controls")),
					_if(businessProcess._filesArchiveUrl, th())
				)
			),
			tbody(
				tr(
					td(businessProcess._businessName),
					td(businessProcess._label),
					td(businessProcess.submissionForms
						._isAffidavitSigned._lastModified.map(formatLastModified)),
					td(businessProcess._isApproved._lastModified.map(formatLastModified)),
					td(
						list(businessProcess.registrations.requested, function (reg) {
							return span({ class: 'label-reg' }, reg.abbr);
						})
					),
					_if(businessProcess._filesArchiveUrl,
						td({ class: 'submitted-user-data-table-action' },
							a({ class: 'hint-optional hint-optional-left', target: "_blank",
								'data-hint': _("Download the electronic file"),
								download: businessProcess._filesArchiveUrl.map(function (name) {
									if (!name) return;
									return name.slice(1);
								}),
								href: businessProcess._filesArchiveUrl }, i({ class: 'fa fa-download' }))))
				)
			)
		)
	),
		section(
			{ class: 'section-primary' },
			h2({ class: 'container-with-nav' }, _("History of your request"),
				a(
					{ class: 'hint-optional hint-optional-left',
						'data-hint': _("Print history of your request"),
						href: urlPrefix + 'print-request-history/',
						target: '_blank' },
					span({ class: 'fa fa-print' }, _("Print"))
				)),
			scrollableElem = div(
				{ class: 'submitted-user-history-wrapper' },<commit_msg>Refactored cell-action in submitted-user-data-table. #764<commit_after>// Documents list and user data

'use strict';

var curry              = require('es5-ext/function/#/curry')
  , nextTick           = require('next-tick')
  , _                  = require('mano').i18n.bind('User Submitted')
  , formatLastModified = require('./utils/last-modified')
  , scrollBottom       = require('./utils/scroll-to-bottom');

module.exports = function (context/*, options */) {
	var options = Object(arguments[1])
	  , businessProcess = context.businessProcess
	  , urlPrefix = options.urlPrefix || '/', scrollableElem;

	return [section(
		{ class: 'submitted-main table-responsive-container' },
		table(
			{ class: 'submitted-user-data-table submitted-current-user-data-table', responsive: true },
			thead(
				tr(
					th(_("Entity")),
					th(_("Service")),
					th(_("Submission date")),
					th(_("Withdraw date")),
					th(_("Inscriptions and controls")),
					th()
				)
			),
			tbody(
				tr(
					td(businessProcess._businessName),
					td(businessProcess._label),
					td(businessProcess.submissionForms
						._isAffidavitSigned._lastModified.map(formatLastModified)),
					td(businessProcess._isApproved._lastModified.map(formatLastModified)),
					td(
						list(businessProcess.registrations.requested, function (reg) {
							return span({ class: 'label-reg' }, reg.abbr);
						})
					),
					td({ class: 'submitted-user-data-table-action' },
						_if(businessProcess._filesArchiveUrl,
							a({ class: 'hint-optional hint-optional-left', target: "_blank",
								'data-hint': _("Download the electronic file"),
								download: businessProcess._filesArchiveUrl.map(function (name) {
									if (!name) return;
									return name.slice(1);
								}),
								href: businessProcess._filesArchiveUrl }, i({ class: 'fa fa-download' }))))
				)
			)
		)
	),
		section(
			{ class: 'section-primary' },
			h2({ class: 'container-with-nav' }, _("History of your request"),
				a(
					{ class: 'hint-optional hint-optional-left',
						'data-hint': _("Print history of your request"),
						href: urlPrefix + 'print-request-history/',
						target: '_blank' },
					span({ class: 'fa fa-print' }, _("Print"))
				)),
			scrollableElem = div(
				{ class: 'submitted-user-history-wrapper' },
{'fraction_non_alphanumeric': 0.15866116061725713, 'fraction_numerical': 0.0032601608346011736, 'mean_word_length': 3.0297723292469354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4805790', 'n_tokens_mistral': 1798, 'n_tokens_neox': 1381, 'n_words': 271}