new.mako
59 lines
| 2.2 KiB
| application/x-mako
|
MakoHtmlLexer
r1282 | <%inherit file="base.mako"/> | |||
<%namespace name="widgets" file="/widgets.mako"/> | ||||
<%def name="breadcrumbs_links()"> | ||||
%if c.repo: | ||||
r3442 | ${_('Settings')} | |||
r1282 | %elif c.repo_group: | |||
r3442 | ${_('Settings')} | |||
r1282 | %else: | |||
r1758 | ${h.link_to(_('Admin'),h.route_path('admin_home'))} | |||
r1282 | » | |||
r2333 | ${h.link_to(_('Settings'),h.route_path('admin_settings'))} | |||
r1282 | » | |||
${h.link_to(_('Integrations'),request.route_url(route_name='global_integrations_home'))} | ||||
%endif | ||||
» | ||||
${_('Create new integration')} | ||||
</%def> | ||||
<%widgets:panel class_='integrations'> | ||||
<%def name="title()"> | ||||
%if c.repo: | ||||
${_('Create New Integration for repository: {repo_name}').format(repo_name=c.repo.repo_name)} | ||||
%elif c.repo_group: | ||||
${_('Create New Integration for repository group: {repo_group_name}').format(repo_group_name=c.repo_group.group_name)} | ||||
%else: | ||||
${_('Create New Global Integration')} | ||||
%endif | ||||
</%def> | ||||
r2138 | %for integration, IntegrationObject in c.available_integrations.items(): | |||
r1282 | <% | |||
if c.repo: | ||||
create_url = request.route_path('repo_integrations_create', | ||||
repo_name=c.repo.repo_name, | ||||
integration=integration) | ||||
elif c.repo_group: | ||||
create_url = request.route_path('repo_group_integrations_create', | ||||
repo_group_name=c.repo_group.group_name, | ||||
integration=integration) | ||||
else: | ||||
create_url = request.route_path('global_integrations_create', | ||||
integration=integration) | ||||
r2138 | if IntegrationObject.is_dummy: | |||
create_url = request.current_route_path() | ||||
r1282 | %> | |||
r2138 | <a href="${create_url}" class="integration-box ${'dummy-integration' if IntegrationObject.is_dummy else ''}"> | |||
r1282 | <%widgets:panel> | |||
<h2> | ||||
<div class="integration-icon"> | ||||
r2576 | ${IntegrationObject.icon()|n} | |||
r1282 | </div> | |||
r2138 | ${IntegrationObject.display_name} | |||
r1282 | </h2> | |||
r2138 | ${IntegrationObject.description or _('No description available')} | |||
r1282 | </%widgets:panel> | |||
</a> | ||||
%endfor | ||||
<div style="clear:both"></div> | ||||
</%widgets:panel> | ||||