Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
{% extends '@MauticUser/Security/base.html.twig' %}
|
||||
{% block headerTitle %}mautic.api.oauth.header{% endblock %}
|
||||
{% set name = client.getName() %}
|
||||
{% set msg = name is empty ? 'mautic.api.oauth.clientnoname'|trans : 'mautic.api.oauth.clientwithname'|trans({'name' : name}) %}
|
||||
{% block content %}
|
||||
<h4 class="mb-lg">{{ msg|purify }} </h4>
|
||||
<form class="form-login text-center" role="form" name="fos_oauth_server_authorize_form" action="{{ path('fos_oauth_server_authorize') }}" method="post">
|
||||
|
||||
<input type="submit" class="btn btn-primary btn-accept" name="accepted" value="{{ 'mautic.api.oauth.accept'|trans }}" />
|
||||
<input type="submit" class="btn btn-danger btn-deny" name="rejected" value="{{ 'mautic.api.oauth.deny'|trans }}" />
|
||||
|
||||
{{ form_row(form.client_id) }}
|
||||
{{ form_row(form.response_type) }}
|
||||
{{ form_row(form.redirect_uri) }}
|
||||
{{ form_row(form.state) }}
|
||||
{{ form_row(form.scope) }}
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,27 @@
|
||||
{% block content %}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px;"></th>
|
||||
<th>{{ 'mautic.core.name'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k in clients %}
|
||||
<tr>
|
||||
<td>
|
||||
{{- include('@MauticCore/Helper/confirm.html.twig', {
|
||||
'btnClass' : 'btn btn-danger btn-xs',
|
||||
'message' : 'mautic.api.client.form.confirmrevoke'|trans({'%name%' : k.getName()}),
|
||||
'confirmText' : 'mautic.api.client.form.revoke'|trans,
|
||||
'confirmAction' : path('mautic_client_action', {'objectAction' : 'revoke', 'objectId' : k.getId()}),
|
||||
'iconClass' : 'ri-delete-bin-line',
|
||||
'btnText' : 'mautic.api.client.form.revoke'|trans,
|
||||
}) -}}
|
||||
</td>
|
||||
<td>{{ k.getName() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
{% block mauticContent %}client{% endblock %}
|
||||
{% set id = form.vars.data.getId() %}
|
||||
{% if id is empty %}
|
||||
{% set header = 'mautic.api.client.header.edit'|trans({'%name%' : form.vars.data.getName()}) %}
|
||||
{% else %}
|
||||
{% set header = 'mautic.api.client.header.new'|trans %}
|
||||
{% endif %}
|
||||
{% block headerTitle %}{{ header }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="col-sm-9 pt-lg">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form(form) }}
|
||||
</div>
|
||||
{{ include('@MauticWebhook/Modules/webhooks_card.html.twig', ignore_missing=true) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,143 @@
|
||||
{# //Check to see if the entire page should be displayed or just main content #}
|
||||
{% set isIndex = tmpl == 'index' ? true : false %}
|
||||
{% set tmpl = 'list' %}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
{% block headerTitle %}{% trans %}mautic.api.client.header.index{% endtrans %}{% endblock %}
|
||||
{% block mauticContent %}client{% endblock %}
|
||||
{% block actions %}
|
||||
{{- include('@MauticCore/Helper/page_actions.html.twig',
|
||||
{
|
||||
'templateButtons' : {
|
||||
'new' : permissions.create,
|
||||
},
|
||||
'routeBase' : 'client',
|
||||
'langVar' : 'api.client',
|
||||
}
|
||||
) -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if isIndex %}
|
||||
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
|
||||
{{- include('@MauticCore/Helper/list_toolbar.html.twig', {
|
||||
'searchValue' : searchValue,
|
||||
'searchHelp' : 'mautic.api.client.help.searchcommands',
|
||||
'filters' : filters,
|
||||
}) -}}
|
||||
<div class="page-list">
|
||||
{{ block('listResults') }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ block('listResults') }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block listResults %}
|
||||
{% if items|length > 0 %}
|
||||
<div class="table-responsive panel-collapse pull out page-list">
|
||||
<table class="table table-hover client-list">
|
||||
<thead>
|
||||
<tr>
|
||||
{{- include(
|
||||
'@MauticCore/Helper/tableheader.html.twig',
|
||||
{
|
||||
'checkall' : false,
|
||||
'text' : null,
|
||||
'target' : '.client-list',
|
||||
'action' : currentRoute,
|
||||
'routeBase' : 'client',
|
||||
'templateButtons' : {},
|
||||
}
|
||||
) -}}
|
||||
{{- include(
|
||||
'@MauticCore/Helper/tableheader.html.twig',
|
||||
{
|
||||
'sessionVar' : 'client',
|
||||
'orderBy' : 'c.name',
|
||||
'text' : 'mautic.core.name',
|
||||
'default' : 'true',
|
||||
'class' : 'col-client-name',
|
||||
}
|
||||
) -}}
|
||||
<th class="visible-md visible-lg col-client-publicid">{{ 'mautic.api.client.thead.publicid'|trans }}</th>
|
||||
<th class="visible-md visible-lg col-client-secret">{{ 'mautic.api.client.thead.secret'|trans }}</th>
|
||||
{{- include(
|
||||
'@MauticCore/Helper/tableheader.html.twig',
|
||||
{
|
||||
'sessionVar' : 'client',
|
||||
'orderBy' : 'c.id',
|
||||
'text' : 'mautic.core.id',
|
||||
'class' : 'visible-md visible-lg col-client-id',
|
||||
}
|
||||
) -}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{- include(
|
||||
'@MauticCore/Helper/list_actions.html.twig',
|
||||
{
|
||||
'item' : item,
|
||||
'templateButtons' : {
|
||||
'edit' : permissions.edit,
|
||||
'delete' : permissions.delete,
|
||||
},
|
||||
'routeBase' : 'client',
|
||||
'langVar' : 'api.client',
|
||||
'pull' : 'left',
|
||||
}
|
||||
) -}}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.getName() }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">
|
||||
<input onclick="this.setSelectionRange(0, this.value.length);" type="text" class="form-control" readonly value="{{ item.getPublicId() }}"/>
|
||||
</td>
|
||||
<td class="visible-md visible-lg">
|
||||
<input onclick="this.setSelectionRange(0, this.value.length);" type="text" class="form-control" readonly value="{{ item.getSecret() }}"/>
|
||||
</td>
|
||||
<td class="visible-md visible-lg">{{ item.getId() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-footer">
|
||||
{{- include('@MauticCore/Helper/pagination.html.twig', {
|
||||
'totalItems' : items|length,
|
||||
'page' : page,
|
||||
'limit' : limit,
|
||||
'menuLinkId' : 'mautic_client_index',
|
||||
'baseUrl' : path('mautic_client_index'),
|
||||
'sessionVar' : 'client',
|
||||
'tmpl' : tmpl,
|
||||
}) -}}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if searchValue is not empty %}
|
||||
{{- include('@MauticCore/Helper/noresults.html.twig') -}}
|
||||
{% else %}
|
||||
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
|
||||
{% set childContainer %}
|
||||
<div class="mt-32 mb-md">
|
||||
{% include '@MauticCore/Components/pictogram.html.twig' with {
|
||||
'pictogram': 'api',
|
||||
'size': '80'
|
||||
} %}
|
||||
</div>
|
||||
{% endset %}
|
||||
|
||||
{{ include('@MauticCore/Components/content-block.html.twig', {
|
||||
heading: 'mautic.api.client.contentblock.heading',
|
||||
subheading: 'mautic.api.client.contentblock.subheading',
|
||||
copy: 'mautic.api.client.contentblock.copy',
|
||||
childContainer: childContainer,
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% block _config_apiconfig_widget %}
|
||||
<h4 class="fw-sb mt-48 mb-xs">{{ 'mautic.config.tab.apiconfig'|trans }}</h4>
|
||||
<div class="text-muted small pb-md">{{ 'mautic.core.config.header.apiconfig.description'|trans }}</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-default mb-md">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{% for f in form.children %}
|
||||
<div class="col-xs-12">
|
||||
{{ form_row(f) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends '@MauticUser/Security/base.html.twig' %}
|
||||
{% block headerTitle %}{{ 'mautic.api.oauth.header'|trans }}{% endblock %}
|
||||
{% block content %}
|
||||
<form class="form-group login-form" name="login" data-toggle="ajax" role="form" action="{{ path(route) }}" method="post">
|
||||
<div class="input-group mb-md">
|
||||
<span class="input-group-addon"><i class="ri-user-6-fill"></i></span>
|
||||
<label for="username" class="sr-only">{{ 'mautic.user.auth.form.loginusername'|trans }}</label>
|
||||
<input type="text" id="username" name="_username" class="form-control input-lg" value="{{ last_username }}" required autofocus placeholder="{{ 'mautic.user.auth.form.loginusername'|trans }}" />
|
||||
</div>
|
||||
<div class="input-group mb-md">
|
||||
<span class="input-group-addon"><i class="ri-key-2-line"></i></span>
|
||||
<label for="password" class="sr-only">{{ 'mautic.core.password'|trans }}:</label>
|
||||
<input type="password" id="password" name="_password" class="form-control input-lg" required placeholder="{{ 'mautic.core.password'|trans }}" />
|
||||
</div>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{{ 'mautic.user.auth.form.loginbtn'|trans }}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,11 @@
|
||||
{% block content %}
|
||||
{% if showMore is defined and showMore is not empty %}
|
||||
<a href="{{ url('mautic_client_index', {'search' : searchString}) }}" data-toggle="ajax">
|
||||
<span>{{ 'mautic.core.search.more'|trans({'%count%' : remaining}) }}</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ url('mautic_client_action', {'objectAction' : 'edit', 'objectId' : item.getId()}) }}">
|
||||
{{ item.getName() }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user