HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/websiteFunctions/templates/websiteFunctions/WPConfigurePlugins.html
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "Configure Plugin Buckets - CyberPanel" %}{% endblock %}

{% block header_scripts %}
<style>
    /* Configure Plugins Page Specific Styles */
    .plugins-wrapper {
        background: transparent;
        padding: 20px;
    }
    
    .plugins-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .plugins-section {
        background: var(--bg-secondary, white);
        border-radius: 12px;
        padding: 25px;
        margin-bottom: 25px;
        box-shadow: 0 2px 8px var(--shadow-color, rgba(0,0,0,0.08));
        border: 1px solid var(--border-color, #e8e9ff);
    }
    
    .section-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-heading, #2f3640);
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .section-title::before {
        content: '';
        width: 4px;
        height: 24px;
        background: var(--accent-color, #5b5fcf);
        border-radius: 2px;
    }
    
    .plugins-description {
        color: var(--text-secondary, #8893a7);
        font-size: 14px;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .header-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .btn-primary {
        background: var(--accent-color, #5b5fcf);
        border: 1px solid var(--accent-color, #5b5fcf);
        color: white;
        padding: 10px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }
    
    .btn-primary:hover {
        background: var(--accent-hover, #4b4fbf);
        border-color: var(--accent-hover, #4b4fbf);
        box-shadow: 0 3px 8px rgba(91,95,207,0.3);
        transform: translateY(-1px);
        text-decoration: none;
        color: white;
    }
    
    /* Table Styles */
    .table-container {
        background: var(--bg-hover, #fafbff);
        border: 1px solid var(--border-color, #e8e9ff);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table {
        width: 100%;
        margin-bottom: 0;
        background: var(--bg-secondary, white);
    }
    
    .table thead {
        background: var(--bg-hover, #fafbff);
    }
    
    .table th {
        border: none;
        padding: 15px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-secondary, #8893a7);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid var(--border-color, #e8e9ff);
    }
    
    .table td {
        border: none;
        padding: 15px;
        font-size: 14px;
        color: var(--text-primary, #2f3640);
        border-bottom: 1px solid var(--border-light, #f1f3f5);
        vertical-align: middle;
    }
    
    .table tbody tr:hover {
        background: var(--bg-hover, #fafbff);
    }
    
    .table tbody tr:last-child td {
        border-bottom: none;
    }
    
    /* Action Buttons */
    .action-buttons {
        display: flex;
        gap: 10px;
    }
    
    .btn-action {
        padding: 6px 16px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        text-decoration: none;
        border: 1px solid transparent;
        background: transparent;
    }
    
    .btn-edit {
        color: var(--success-accent, #10b981);
        border-color: var(--success-border, #d1fae5);
        background: var(--success-light, #f0fdf4);
    }
    
    .btn-edit:hover {
        background: var(--success-accent, #10b981);
        color: white;
        border-color: var(--success-accent, #10b981);
        text-decoration: none;
    }
    
    .btn-delete {
        color: var(--danger-accent, #ef4444);
        border-color: var(--danger-border, #fee2e2);
        background: var(--danger-light, #fef2f2);
    }
    
    .btn-delete:hover {
        background: var(--danger-accent, #ef4444);
        color: white;
        border-color: var(--danger-accent, #ef4444);
    }
    
    /* Empty State */
    .empty-state {
        text-align: center;
        padding: 60px 20px;
        color: var(--text-secondary, #8893a7);
    }
    
    .empty-state svg {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
        opacity: 0.3;
    }
    
    .empty-state h3 {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-heading, #2f3640);
        margin-bottom: 10px;
    }
    
    .empty-state p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    /* Modal Styles */
    .modal-content {
        border-radius: 12px;
        border: 1px solid var(--border-color, #e8e9ff);
        box-shadow: 0 10px 40px var(--shadow-color, rgba(0,0,0,0.1));
    }
    
    .modal-header {
        background: var(--bg-hover, #fafbff);
        border-bottom: 1px solid var(--border-color, #e8e9ff);
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-heading, #2f3640);
        margin: 0;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-footer {
        background: var(--bg-hover, #fafbff);
        border-top: 1px solid var(--border-color, #e8e9ff);
        padding: 15px 20px;
        border-radius: 0 0 12px 12px;
    }
    
    .btn-default {
        background: var(--bg-secondary, white);
        border: 1px solid var(--border-color, #e8e9ff);
        color: var(--text-primary, #2f3640);
        padding: 8px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .btn-default:hover {
        background: var(--bg-hover, #f8f9ff);
        border-color: var(--accent-color, #5b5fcf);
        color: var(--accent-color, #5b5fcf);
    }
    
    .btn-danger {
        background: #ef4444;
        border: 1px solid #ef4444;
        color: white;
        padding: 8px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .btn-danger:hover {
        background: #dc2626;
        border-color: #dc2626;
        box-shadow: 0 3px 8px rgba(239,68,68,0.3);
    }
    
    .loading-spinner {
        width: 16px;
        height: 16px;
        margin-left: 8px;
    }
    
    /* Responsive */
    @media (max-width: 768px) {
        .plugins-wrapper {
            padding: 15px;
        }
        
        .plugins-section {
            padding: 20px;
        }
        
        .header-actions {
            flex-direction: column;
            align-items: stretch;
        }
        
        .table-container {
            overflow-x: auto;
        }
        
        .action-buttons {
            flex-direction: column;
        }
        
        .btn-action {
            width: 100%;
            text-align: center;
        }
    }
</style>

<script>
    var deleteUrl = '';
    
    // Ensure modal is hidden on page load
    $(document).ready(function() {
        $('#DeleteMember').modal('hide');
    });
    
    function DeletePluginBuucket(url) {
        deleteUrl = url;
        $('#DeleteMember').modal('show');
    }
    
    function FinalDeletePluginBuucket() {
        window.location.href = deleteUrl;
    }
</script>
{% endblock %}

{% block content %}
<div class="plugins-wrapper" ng-controller="listTableUsers">
    <div class="plugins-container">
        <!-- Header Section -->
        <div class="plugins-section">
            <div class="header-actions">
                <h2 class="section-title">CONFIGURE PLUGIN BUCKETS</h2>
                <a href="{% url 'Addnewplugin' %}" class="btn-primary">
                    <i class="fas fa-plus"></i>
                    {% trans "Create New Bucket" %}
                </a>
            </div>
            <p class="plugins-description">{% trans "You can configure list of plugins that will automatically get installed while deploying WordPress." %}</p>
        </div>

        <!-- Plugin Buckets List -->
        <div class="plugins-section">
            <h3 class="section-title">
                PLUGIN BUCKETS
                <img ng-hide="cyberpanelLoading" src="{% static 'images/loading.gif' %}" class="loading-spinner">
            </h3>
            
            {% if Selectedplugins %}
                <div class="table-container">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Bucket Name</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for sub in Selectedplugins %}
                                <tr>
                                    <td>{{ sub.id }}</td>
                                    <td>
                                        <strong>{{ sub.Name }}</strong>
                                    </td>
                                    <td>
                                        <div class="action-buttons">
                                            <a href="{% url 'EidtPlugin' %}?ID={{ sub.id }}" class="btn-action btn-edit">
                                                <i class="fas fa-edit"></i>
                                                Edit
                                            </a>
                                            <button onclick="DeletePluginBuucket('{% url 'ConfigurePlugins' %}?delete={{ sub.id }}')"
                                                    class="btn-action btn-delete">
                                                <i class="fas fa-trash"></i>
                                                Delete
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                </div>
            {% else %}
                <div class="empty-state">
                    <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
                    </svg>
                    <h3>No Plugin Buckets Found</h3>
                    <p>Create your first plugin bucket to get started.</p>
                    <a href="{% url 'Addnewplugin' %}" class="btn-primary">
                        <i class="fas fa-plus"></i>
                        Create Plugin Bucket
                    </a>
                </div>
            {% endif %}
        </div>
    </div>
</div>

<!-- Delete Confirmation Modal -->
<div class="modal fade" id="DeleteMember" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Delete Plugin Bucket</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <p>Are you sure you want to delete this plugin bucket? This action cannot be undone.</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" onclick="FinalDeletePluginBuucket()" class="btn btn-danger">
                    <i class="fas fa-trash"></i>
                    Delete
                </button>
            </div>
        </div>
    </div>
</div>
{% endblock %}