Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
{% if item.projects is not empty %}
|
||||
<div class="project-group d-inline-flex gap-3 mb-xs">
|
||||
{% for project in item.projects %}
|
||||
|
||||
{% set projectPopover %}
|
||||
<header class="project-popover__header mt-xs">
|
||||
<span class="project-popover__icon" aria-hidden="true"><i class="ri-archive-stack-line"></i></span>
|
||||
<h2 class="project-popover__title type-heading-02 text-interactive">{{ project.name }}</h2>
|
||||
</header>
|
||||
|
||||
<div class="project-popover__meta mb-md">
|
||||
{% if project.dateModified is not empty %}
|
||||
<span class="project-popover__meta-text type-label-01 text-secondary">
|
||||
{{ 'mautic.project.popover.updated.on'|trans({'%date%': project.dateModified.date|date}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p class="project-popover__description type-body-compact-01 mb-md">
|
||||
{{ project.description|striptags|slice(0, 150) ~ (project.description|length > 150 ? '...' : '') }}
|
||||
</p>
|
||||
|
||||
<div class="project-popover__actions">
|
||||
{% set buttons = [] %}
|
||||
|
||||
{% if securityIsGranted('project:project:view') %}
|
||||
{% set buttons = buttons|merge([
|
||||
{
|
||||
label: 'mautic.project.popover.view.details'|trans,
|
||||
href: path('mautic_project_action', {'objectAction': 'view', 'objectId': project.id}),
|
||||
icon: 'ri-arrow-right-line',
|
||||
variant: 'tertiary',
|
||||
size: 'sm',
|
||||
wide: true,
|
||||
attributes: {
|
||||
class: 'project-popover__action mb-xs'
|
||||
}
|
||||
}
|
||||
]) %}
|
||||
{% endif %}
|
||||
|
||||
{% if securityIsGranted('project:project:edit') %}
|
||||
{% set buttons = buttons|merge([
|
||||
{
|
||||
label: 'mautic.project.popover.edit'|trans,
|
||||
href: path('mautic_project_action', {'objectAction': 'edit', 'objectId': project.id}),
|
||||
icon: 'ri-edit-line',
|
||||
variant: 'tertiary',
|
||||
size: 'sm',
|
||||
wide: true,
|
||||
attributes: {
|
||||
class: 'project-popover__action ml-0'
|
||||
}
|
||||
}
|
||||
]) %}
|
||||
{% endif %}
|
||||
|
||||
{% if buttons|length > 0 %}
|
||||
{% include '@MauticCore/Helper/button.html.twig' with {
|
||||
buttons: buttons
|
||||
} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<footer class="project-popover__footer type-label-01 text-placeholder mt-lg">
|
||||
<span class="project-popover__footer-text">{{ 'mautic.project.popover.footer.label'|trans }}</span>
|
||||
</footer>
|
||||
{% endset %}
|
||||
|
||||
<div class="project-popover" data-toggle="popover" data-content='{{ projectPopover }}' data-html="true" data-container="body" data-placement="bottom" data-trigger="hover" data-delay='{"show": 300, "hide": 2000}'>
|
||||
{% include '@MauticCore/Helper/_tag.html.twig' with {
|
||||
tags: [
|
||||
{
|
||||
label: project.name,
|
||||
color: 'brand',
|
||||
size: 'sm',
|
||||
}
|
||||
]
|
||||
} %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,93 @@
|
||||
{% set hasEntities = false %}
|
||||
{% for entityType, entityData in projectEntities %}
|
||||
{% if entityData.count > 0 %}
|
||||
{% set hasEntities = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if hasEntities %}
|
||||
{% for entityType, entityData in projectEntities %}
|
||||
{% if entityData.count > 0 %}
|
||||
<div id="{{ entityType }}-list-wrapper" class="panel panel-default mt-md">
|
||||
<div class="panel-heading pa-0 toolbar--table-toolbar">
|
||||
<div class="d-flex ai-center jc-space-between list-toolbar toolbar--toolbar-content h-48">
|
||||
<h4 class="panel-title fw-light mb-0 pl-md">{{ entityData.label }}</h4>
|
||||
<a class="btn btn-ghost" data-toggle="ajaxmodal" data-target="#MauticSharedModal" href="{{ path('mautic_project_action', {'objectAction': 'addEntity', 'objectId': project.getId(), 'entityType': entityType}) }}" data-header="{{ 'mautic.project.add'|trans }} {{ entityData.label|trans }}" aria-label="{{ 'mautic.project.add'|trans }} {{ entityData.label|trans }}">
|
||||
<i class="ri-add-line" aria-hidden="true" focusable="false"></i>
|
||||
<span class="hidden-xs hidden-sm">{{ 'mautic.project.add'|trans }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-list">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover {{ entityType }}-list mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-actions"></th>
|
||||
<th class="col-name col-lg-5">{{ 'mautic.core.name'|trans }}</th>
|
||||
<th class="visible-lg col-dateAdded">{{ 'mautic.lead.import.label.dateAdded'|trans }}</th>
|
||||
<th class="visible-lg col-dateModified">{{ 'mautic.lead.import.label.dateModified'|trans }}</th>
|
||||
<th class="visible-lg col-createdBy">{{ 'mautic.core.createdby'|trans }}</th>
|
||||
<th class="visible-md visible-lg col-id">{{ 'mautic.core.id'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entityData.entities %}
|
||||
<tr id="row_{{ entityType }}_{{ entity.getId() }}">
|
||||
<td class="col-xs-1">
|
||||
{{- include('@MauticCore/Helper/list_actions.html.twig', {
|
||||
'item': entity,
|
||||
'templateButtons': {
|
||||
'edit': false,
|
||||
'clone': false,
|
||||
'delete': false
|
||||
},
|
||||
'customButtons': {
|
||||
'remove': {
|
||||
'confirm': {
|
||||
'btnClass': false,
|
||||
'btnText': 'mautic.project.remove_from_project'|trans,
|
||||
'message': 'mautic.project.form.confirm_remove'|trans({'%name%': entity.getName(), '%project%': project.getName()}),
|
||||
'confirmAction': path('mautic_project_action', {'objectAction': 'remove', 'objectId': project.getId(), 'entityType': entityType, 'entityId': entity.getId()}),
|
||||
'template': 'delete'
|
||||
},
|
||||
'iconClass': 'ri-subtract-line',
|
||||
'priority': 100
|
||||
}
|
||||
},
|
||||
}) -}}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('mautic_' ~ entityType ~ '_action', {'objectAction': 'view', 'objectId': entity.getId()}) }}" data-toggle="ajax">
|
||||
{{ entity.getName()|purify }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="visible-lg" title="{{ entity.getDateAdded() ? dateToFullConcat(entity.getDateAdded()) : '' }}">
|
||||
{{ entity.getDateAdded() ? dateToDate(entity.getDateAdded()) : '' }}
|
||||
</td>
|
||||
<td class="visible-lg" title="{{ entity.getDateModified() ? dateToFullConcat(entity.getDateModified()) : '' }}">
|
||||
{{ entity.getDateModified() ? dateToDate(entity.getDateModified()) : '' }}
|
||||
</td>
|
||||
<td class="visible-lg">
|
||||
{{ entity.getCreatedByUser() ? entity.getCreatedByUser()|escape : '' }}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">
|
||||
<span class="text-muted">{{ entity.getId() }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{- include('@MauticCore/Helper/noresults.html.twig', {
|
||||
'header': 'mautic.project.no_assigned_entities.header',
|
||||
'message': 'mautic.project.no_assigned_entities.message'
|
||||
}) -}}
|
||||
{% endif %}
|
||||
@@ -0,0 +1 @@
|
||||
{{ form(form) }}
|
||||
@@ -0,0 +1,101 @@
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent %}project
|
||||
{% endblock %}
|
||||
|
||||
{% block preHeader %}
|
||||
{{ include('@MauticCore/Helper/page_actions.html.twig', {
|
||||
'item': project,
|
||||
'templateButtons': {
|
||||
'close': true,
|
||||
},
|
||||
'routeBase': 'project',
|
||||
'langVar': 'project',
|
||||
'targetLabel': 'mautic.project.projects'|trans
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{{ project.getName() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{{ include('@MauticCore/Helper/page_actions.html.twig', {
|
||||
'item': project,
|
||||
'customButtons': [
|
||||
{
|
||||
'attr': {
|
||||
'data-toggle': 'ajaxmodal',
|
||||
'data-target': '#MauticSharedModal',
|
||||
'data-header': 'mautic.project.add_entity'|trans,
|
||||
'href': path('mautic_project_action', {'objectAction': 'selectEntityType', 'objectId': project.getId()})
|
||||
},
|
||||
'iconClass': 'ri-add-line',
|
||||
'btnText': 'mautic.project.add_entity',
|
||||
'primary': true
|
||||
}
|
||||
],
|
||||
'nameGetter': 'getName',
|
||||
'templateButtons': {
|
||||
'edit': securityIsGranted('project:project:edit'),
|
||||
'delete': securityIsGranted('project:project:delete'),
|
||||
},
|
||||
'routeBase': 'project'
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="box-layout">
|
||||
<div class="col-md-12 height-auto">
|
||||
<div>
|
||||
<div class="pr-md pl-md pt-lg pb-lg">
|
||||
<div class="box-layout">
|
||||
<div class="col-xs-10">
|
||||
<div class="text-white dark-sm mb-0">{{ project.getDescription()|purify }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse" id="sms-details">
|
||||
<div class="pr-md pl-md pb-md">
|
||||
<div class="panel shd-none mb-0">
|
||||
<table class="table mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%">
|
||||
<span class="fw-b textTitle">{{ 'mautic.core.id'|trans }}</span>
|
||||
</td>
|
||||
<td>{{ project.getId() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="hr-expand nm">
|
||||
<span data-toggle="tooltip" title="Detail">
|
||||
<a href="javascript:void(0)" class="arrow text-muted collapsed" data-toggle="collapse" data-target="#sms-details">
|
||||
<span class="caret"></span>
|
||||
{{ 'mautic.core.details'|trans }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Project Items Section -->
|
||||
<div id="project-items-section" class="mt-lg">
|
||||
<div class="pr-md pl-md pb-lg">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ include('@MauticProject/Project/_entity_list.html.twig') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input name="entityId" id="entityId" type="hidden" value="{{ project.getId()|e }}"/>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,41 @@
|
||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||
|
||||
{% block mauticContent 'project' %}
|
||||
|
||||
{% block headerTitle %}
|
||||
{% if form.vars.data.id %}
|
||||
{{ 'mautic.project.menu.edit'|trans({'%name%': entity.getName()}) }}
|
||||
{% else %}
|
||||
{{ 'mautic.project.menu.new'|trans }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
<div class="box-layout">
|
||||
<div class="col-md-9 height-auto">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<!-- start: tab-content -->
|
||||
<div class="tab-content pa-md">
|
||||
<div class="tab-pane fade in active bdr-w-0" id="details">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,173 @@
|
||||
{% set isIndex = 'index' == tmpl %}
|
||||
{% set tmpl = 'list' %}
|
||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||
|
||||
{% block mauticContent 'projects' %}
|
||||
|
||||
{% block headerTitle 'project.menu.index'|trans %}
|
||||
|
||||
{% 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,
|
||||
'action': currentRoute,
|
||||
'page_actions': {
|
||||
'templateButtons': {
|
||||
'new': permissions['project:project:create'],
|
||||
},
|
||||
'routeBase': 'project',
|
||||
'langVar' : 'project.list',
|
||||
},
|
||||
'bulk_actions': {
|
||||
'routeBase': 'project',
|
||||
'templateButtons': {
|
||||
'delete': permissions['project:project:delete'],
|
||||
},
|
||||
},
|
||||
'quickFilters': [
|
||||
{
|
||||
'search': 'mautic.core.searchcommand.ismine',
|
||||
'label': 'mautic.core.searchcommand.ismine.label',
|
||||
'tooltip': 'mautic.core.searchcommand.ismine.description',
|
||||
'icon': 'ri-user-line'
|
||||
}
|
||||
]
|
||||
}) }}
|
||||
<div class="page-list">
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if items|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="projectsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'checkall': true,
|
||||
'target': '#projectsTable',
|
||||
'langVar': 'project.project',
|
||||
'routeBase': 'project',
|
||||
'templateButtons': {
|
||||
'delete': permissions['project:project:delete']
|
||||
}
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'projects',
|
||||
'orderBy': 'p.name',
|
||||
'text': 'mautic.core.name',
|
||||
'class': 'col-project-name'
|
||||
}) }}
|
||||
|
||||
<th class="visible-md visible-lg col-project-entities-count">
|
||||
{{ 'mautic.project.list.thead.project.count'|trans }}
|
||||
</th>
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'projects',
|
||||
'orderBy': 'p.dateAdded',
|
||||
'text': 'mautic.core.date.added',
|
||||
'class': 'col-project-date-added'
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'projects',
|
||||
'orderBy': 'p.dateModified',
|
||||
'text': 'mautic.core.date.modified',
|
||||
'class': 'col-project-date-modified'
|
||||
}) }}
|
||||
|
||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||
'sessionVar': 'projects',
|
||||
'orderBy': 'p.id',
|
||||
'text': 'mautic.core.id',
|
||||
'class': 'visible-md visible-lg col-project-id'
|
||||
}) }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ include('@MauticCore/Helper/list_actions.html.twig', {
|
||||
'item': item,
|
||||
'templateButtons': {
|
||||
'edit': permissions['project:project:edit'],
|
||||
'delete': permissions['project:project:delete']
|
||||
},
|
||||
'routeBase': 'project',
|
||||
'langVar': 'project',
|
||||
'nameGetter': 'getName'
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
{% if permissions['project:project:edit'] %}
|
||||
<a href="{{ path('mautic_project_action', {'objectAction': 'view', 'objectId': item.getId()}) }}" data-toggle="ajax">
|
||||
{{ item.getName()|e }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ item.getName() }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.getDescription() %}
|
||||
<div class="text-muted mt-4">
|
||||
<small>{{ item.getDescription()|purify }}</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="visible-md visible-lg">
|
||||
<a href="{{ path('mautic_project_action', {'objectAction': 'view', 'objectId': item.getId()}) }}" data-toggle="ajax" data-menu-link="mautic_project_index" size="sm" class="label label-gray" {% if 0 == item.entitiesCount|default(0) %}disabled="disabled"{% endif %}>
|
||||
{{- 'mautic.project.entity.count'|trans({'%count%': item.entitiesCount|default(0)}) -}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<abbr title="{{ dateToFull(item.getDateAdded) }}">
|
||||
{{ dateToText(item.getDateAdded) }}
|
||||
</abbr>
|
||||
</td>
|
||||
<td>
|
||||
<abbr title="{{ dateToFull(item.getDateModified) }}">
|
||||
{{ dateToText(item.getDateModified) }}
|
||||
</abbr>
|
||||
</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,
|
||||
'baseUrl': path('mautic_project_index'),
|
||||
'sessionVar': 'project'
|
||||
}) }}
|
||||
</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': 'asset-management',
|
||||
'size': '80'
|
||||
} %}
|
||||
</div>
|
||||
{% endset %}
|
||||
{{ include('@MauticCore/Components/content-block.html.twig', {
|
||||
heading: 'mautic.project.contentblock.heading'|trans,
|
||||
subheading: 'mautic.project.contentblock.subheading'|trans,
|
||||
copy: 'mautic.project.contentblock.copy'|trans,
|
||||
childContainer: childContainer,
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="mb-lg">
|
||||
<p class="text-muted">{{ 'mautic.project.select_entity_type.description'|trans }}</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% for entityType, entityData in entityTypes %}
|
||||
<div class="col-md-6 mb-sm">
|
||||
{% include '@MauticCore/Components/tile.html.twig' with {
|
||||
type: 'clickable',
|
||||
content: '<div class="d-flex jc-space-between ai-center"><div class="tile-title">' ~ entityData.label|trans ~ '</div></div>',
|
||||
href: path('mautic_project_action', {'objectAction': 'addEntity', 'objectId': project.getId(), 'entityType': entityType}),
|
||||
icon: 'ri-add-line',
|
||||
attributes: {
|
||||
'data-toggle': 'ajaxmodal',
|
||||
'data-target': '#MauticSharedModal',
|
||||
'data-header': entityData.label|trans
|
||||
}
|
||||
} %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user