<commit_before>{%- extends 'base/sidebar.html.twig' -%}

{%- set user_menu =  {
	'users_show_self': {'fa': 'user'},
	'messages_self': {'fa': 'newspaper-o', 'config_en': 'messages.enabled'},
	'transactions_self': {'fa': 'exchange', 'config_en': 'transactions.enabled'},
} -%}

{%- block navbar_toggle_button -%}
	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
		<span class="sr-only">Toggle navigation</span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
	</button>
{%- endblock navbar_toggle_button -%}

{%- block navbar_collapse -%}
	<div class="collapse navbar-collapse" id="navbar-collapse-1">
	<ul class="nav navbar-nav navbar-right">

	{%- block navbar_menu -%}
		{%- set su_logins_role_short = su_logins_role_short() -%}
		{%- set intersystem_schemas = config_bool('intersystem.enabled', schema) ? intersystem_schemas(su_schema()) : [] -%}

		{%- if su_logins_role_short|length > 1 or (intersystem_schemas|length and su_logins_role_short|length) -%}
			{%- embed 'embed/menu_dropdown.html.twig' -%}
				{%- block fa -%}share-alt{%- endblock fa -%}
				{%- block label -%}{{- 'system_menu.system'|trans -}}{%- endblock label -%}
				{%- block menu_items -%}
					<li class="dropdown-header">
						{%- if su_logins_role_short|length == 1 -%}
							{{- 'system_menu.own_system'|trans -}}
						{%- else -%}
							{{- 'system_menu.own_systems'|trans -}}
						{%- endif -%}
					</li>
					{%- for sch, rlshrt in su_logins_role_short -%}
						<li{%- if sch == su_schema() %} class="active{%- if sch != schema -%}-group{%- endif -%}"{%- endif -%}>
							<a href="{{- path(route|fallback_route(sch), {'system': system(sch), 'role_short': rlshrt}) -}}">
								{{- config_str('system.name', sch) -}}
							</a>
						</li>
					{%- endfor -%}
					{%- if intersystem_schemas|length -%}
						<li class="dropdown-header">
							{%- if intersystem_schemas|length == 1 -%}
								{{- 'system_menu.linked_intersystem'|trans -}}
							{%- else -%}
								{{- 'system_menu.linked_intersystems'|trans -}}
							{%- endif -%}
						</li>
					{%- endif -%}
					{%- for sch in intersystem_schemas -%}
						<li{%- if sch == schema %} class="active"{%- endif -%}>
							<a href="{{- path(route|fallback_route(sch), {'system': system(sch), 'os': system(su_schema()), 'role_short': 'g', 'welcome': '1'}) -}}">
								{{- config_str('system.name', sch) -}}
							</a>
						</li>
					{%- endfor -%}
				{%- endblock menu_items -%}
			{%- endembed -%}
		{%- endif -%}

		{%- if su_role('user') or su_role('admin') -%}
			{%- if su_is_master() -%}
				{%- set account_name = 'Master' -%}
			{%- else -%}
				{%- set account_name = account(su_id(), su_schema()) -%}
			{%- endif -%}

			{%- if not su_is_system_self() -%}
				{%- set account_name = account_name ~ ' [' ~ config_str('system.name', su_schema()) ~ ']' -%}
			{%- endif -%}

			{%- set su_role_short = su_role('admin') ? 'a' : 'u' -%}

			{%- embed 'embed/menu_dropdown.html.twig' -%}
				{%- block fa -%}user{%- endblock fa -%}
				{%- block label -%}{{- account_name -}}{%- endblock label -%}
				{%- block menu_items -%}
					{%- set pp_su_role_short = pp_ary().role_short ?? su_role_short -%}
					{%- if su_is_system_self() -%}
						{%- for rt, dt in user_menu -%}<commit_msg>self routes role tpl<commit_after>{%- extends 'base/sidebar.html.twig' -%}

{%- set user_menu =  {
	'users_show_self': {'fa': 'user'},
	'messages_self': {'fa': 'newspaper-o', 'config_en': 'messages.enabled'},
	'transactions_self': {'fa': 'exchange', 'config_en': 'transactions.enabled'},
} -%}

{%- block navbar_toggle_button -%}
	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
		<span class="sr-only">Toggle navigation</span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
	</button>
{%- endblock navbar_toggle_button -%}

{%- block navbar_collapse -%}
	<div class="collapse navbar-collapse" id="navbar-collapse-1">
	<ul class="nav navbar-nav navbar-right">

	{%- block navbar_menu -%}
		{%- set su_logins_role_short = su_logins_role_short() -%}
		{%- set intersystem_schemas = config_bool('intersystem.enabled', schema) ? intersystem_schemas(su_schema()) : [] -%}

		{%- if su_logins_role_short|length > 1 or (intersystem_schemas|length and su_logins_role_short|length) -%}
			{%- embed 'embed/menu_dropdown.html.twig' -%}
				{%- block fa -%}share-alt{%- endblock fa -%}
				{%- block label -%}{{- 'system_menu.system'|trans -}}{%- endblock label -%}
				{%- block menu_items -%}
					<li class="dropdown-header">
						{%- if su_logins_role_short|length == 1 -%}
							{{- 'system_menu.own_system'|trans -}}
						{%- else -%}
							{{- 'system_menu.own_systems'|trans -}}
						{%- endif -%}
					</li>
					{%- for sch, rlshrt in su_logins_role_short -%}
						<li{%- if sch == su_schema() %} class="active{%- if sch != schema -%}-group{%- endif -%}"{%- endif -%}>
							<a href="{{- path(route|fallback_route(sch), {'system': system(sch), 'role_short': rlshrt}) -}}">
								{{- config_str('system.name', sch) -}}
							</a>
						</li>
					{%- endfor -%}
					{%- if intersystem_schemas|length -%}
						<li class="dropdown-header">
							{%- if intersystem_schemas|length == 1 -%}
								{{- 'system_menu.linked_intersystem'|trans -}}
							{%- else -%}
								{{- 'system_menu.linked_intersystems'|trans -}}
							{%- endif -%}
						</li>
					{%- endif -%}
					{%- for sch in intersystem_schemas -%}
						<li{%- if sch == schema %} class="active"{%- endif -%}>
							<a href="{{- path(route|fallback_route(sch), {'system': system(sch), 'os': system(su_schema()), 'role_short': 'g', 'welcome': '1'}) -}}">
								{{- config_str('system.name', sch) -}}
							</a>
						</li>
					{%- endfor -%}
				{%- endblock menu_items -%}
			{%- endembed -%}
		{%- endif -%}

		{%- if su_role('user') or su_role('admin') -%}
			{%- if su_is_master() -%}
				{%- set account_name = 'Master' -%}
			{%- else -%}
				{%- set account_name = account(su_id(), su_schema()) -%}
			{%- endif -%}

			{%- if not su_is_system_self() -%}
				{%- set account_name = account_name ~ ' [' ~ config_str('system.name', su_schema()) ~ ']' -%}
			{%- endif -%}

			{%- set su_role_short = su_role('admin') ? 'a' : 'u' -%}

			{%- embed 'embed/menu_dropdown.html.twig' -%}
				{%- block fa -%}user{%- endblock fa -%}
				{%- block label -%}{{- account_name -}}{%- endblock label -%}
				{%- block menu_items -%}
					{%- set pp_su_role_short = pp_ary().role_short ?? su_role_short -%}
					{%- if pp_role('user') or pp_role('admin') -%}
						{%- for rt, dt in user_menu -%}
{'fraction_non_alphanumeric': 0.2285377705787071, 'fraction_numerical': 0.0017670446178766014, 'mean_word_length': 3.0189349112426034, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 53, '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': '4129001', 'n_tokens_mistral': 3148, 'n_tokens_neox': 2514, 'n_words': 435}