<commit_before><%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>

<%def name="title()">${_("Home")}</%def>

<%def name="breadcrumbs()">
    ${h.instance.breadcrumbs(c.page_instance)|n} ${h.url.link(h.instance.area_title('overview'), h.entity_url(c.page_instance))|n}
</%def>


<%block name="main_content">

<div class="top_actions">
    %if can.instance.edit_overview(c.page_instance):
    <a class="button" href="${h.entity_url(c.page_instance, member='/settings/overview')}">${_('edit')}</a>
    %endif
</div>

<div class="instance_description">
    ${c.tile.description|n}
</div>

%for type in h.config.get_list('adhocracy.instance_overview_contents'):

%if type == u'proposals' and c.page_instance.show_proposals_navigation:
<hr />
<div id="new_proposals_table" class="table">
    %if not h.config.get_bool('adhocracy.show_instance_overview_proposals_all'):
    <h3 class="section">${_("Newest Proposals")}</h3>
    %endif
    ${c.proposals_pager.here()}

    <div id="proposal-actions" class="list_button">
        <% auth = check.proposal.create() %>
        %if auth:
        <a class="button add ttip"
           title="${_('Introduce a new idea to debate.')}"
           href="${h.base_url('/proposal/new')}">${_("new proposal")}</a>
        %elif auth.propose_join():
        <a class="button add ttip"
           title="${_('Join instance to create a new proposal.')}"
           href="${h.base_url('/proposal/new')}" rel="#overlay-join-button">${_("new proposal")}</a>
        %elif auth.propose_login():
        <a class="button add ttip"
           title="${_('Login to create a new proposal.')}"
           href="${h.base_url('/proposal/new')}" rel="#overlay-login-button">${_("new proposal")}</a>
        %elif auth.propose_validate_email():
        <a class="button add ttip"
           title="${_('Validate email in order to create a new proposal.')}"
           rel="#overlay-validate-button">${_("new proposal")}</a>
        %endif

        %if not h.config.get_bool('adhocracy.show_instance_overview_proposals_all'):
        <a href="${h.base_url('/proposal')}"
           class="button edit ttip"
           title="${_('show a list of proposals')}">${_("more proposals")}</a>
        %endif
    </div>

</div>
%endif

%if type == u'milestones' and c.page_instance.milestones:
<hr />
%if h.config.get_int('adhocracy.number_instance_overview_milestones') == 1:
<h3 class="section">${_("Next milestone")}</h3>
%else:
<h3 class="section">${_("Next milestones")}</h3>
%endif
${c.next_milestones_pager.here()}
%endif

%if type == u'events':
<hr />
<h3>${_('Newest Events')}</h3>
${c.events_pager.here()}
%endif

%endfor
</%block>

<%block name="sidebar">
%if h.has_permission("watch.instance"):
${components.watch(c.instance)}<commit_msg>Move context instance edit button to sidebar<commit_after><%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>

<%def name="title()">${_("Home")}</%def>

<%def name="breadcrumbs()">
    ${h.instance.breadcrumbs(c.page_instance)|n} ${h.url.link(h.instance.area_title('overview'), h.entity_url(c.page_instance))|n}
</%def>


<%block name="main_content">

<div class="top_actions">
</div>

<div class="instance_description">
    ${c.tile.description|n}
</div>

%for type in h.config.get_list('adhocracy.instance_overview_contents'):

%if type == u'proposals' and c.page_instance.show_proposals_navigation:
<hr />
<div id="new_proposals_table" class="table">
    %if not h.config.get_bool('adhocracy.show_instance_overview_proposals_all'):
    <h3 class="section">${_("Newest Proposals")}</h3>
    %endif
    ${c.proposals_pager.here()}

    <div id="proposal-actions" class="list_button">
        <% auth = check.proposal.create() %>
        %if auth:
        <a class="button add ttip"
           title="${_('Introduce a new idea to debate.')}"
           href="${h.base_url('/proposal/new')}">${_("new proposal")}</a>
        %elif auth.propose_join():
        <a class="button add ttip"
           title="${_('Join instance to create a new proposal.')}"
           href="${h.base_url('/proposal/new')}" rel="#overlay-join-button">${_("new proposal")}</a>
        %elif auth.propose_login():
        <a class="button add ttip"
           title="${_('Login to create a new proposal.')}"
           href="${h.base_url('/proposal/new')}" rel="#overlay-login-button">${_("new proposal")}</a>
        %elif auth.propose_validate_email():
        <a class="button add ttip"
           title="${_('Validate email in order to create a new proposal.')}"
           rel="#overlay-validate-button">${_("new proposal")}</a>
        %endif

        %if not h.config.get_bool('adhocracy.show_instance_overview_proposals_all'):
        <a href="${h.base_url('/proposal')}"
           class="button edit ttip"
           title="${_('show a list of proposals')}">${_("more proposals")}</a>
        %endif
    </div>

</div>
%endif

%if type == u'milestones' and c.page_instance.milestones:
<hr />
%if h.config.get_int('adhocracy.number_instance_overview_milestones') == 1:
<h3 class="section">${_("Next milestone")}</h3>
%else:
<h3 class="section">${_("Next milestones")}</h3>
%endif
${c.next_milestones_pager.here()}
%endif

%if type == u'events':
<hr />
<h3>${_('Newest Events')}</h3>
${c.events_pager.here()}
%endif

%endfor
</%block>

<%block name="sidebar">
%if can.instance.edit_overview(c.page_instance):
<a class="button_round" href="${h.entity_url(c.page_instance, member='/settings/overview')}">${_('Edit')}</a>
%endif
%if h.has_permission("watch.instance"):
${components.watch(c.instance)}
{'fraction_non_alphanumeric': 0.206233303650935, 'fraction_numerical': 0.0032056990204808546, 'mean_word_length': 4.1287671232876715, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '7475886', 'n_tokens_mistral': 1971, 'n_tokens_neox': 1925, 'n_words': 345}