mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 09:46:11 +01:00
additional setting for improved wp page
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "WordPress Toolkit - CyberPanel" %}{% endblock %}
|
{% block title %}{% trans "WordPress Toolkit - CyberPanel" %}{% endblock %}
|
||||||
|
|
||||||
{% block header_scripts %}
|
{% block header_scripts %}{% endblock %}
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.5/angular.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<style>
|
<style>
|
||||||
@@ -301,7 +299,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="container" ng-controller="listWordPressSites">
|
<div class="container" ng-app="CyberCP" ng-controller="listWordPressSites">
|
||||||
<div class="alert alert-info" ng-if="debug">
|
<div class="alert alert-info" ng-if="debug">
|
||||||
<h4>Debug Information</h4>
|
<h4>Debug Information</h4>
|
||||||
<p>Total WordPress Sites: {$ totalSites $}</p>
|
<p>Total WordPress Sites: {$ totalSites $}</p>
|
||||||
@@ -420,14 +418,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add our controller to the existing CyberCP app
|
||||||
app.controller('listWordPressSites', function($scope, $http) {
|
app.controller('listWordPressSites', function($scope, $http) {
|
||||||
// Initialize scope variables
|
// Initialize scope variables
|
||||||
$scope.wpSites = {{ wpsite|safe }};
|
$scope.wpSites = JSON.parse('{{ wpsite|escapejs }}');
|
||||||
$scope.debug = {{ debug_info|default:"false"|safe }};
|
$scope.debug = JSON.parse('{{ debug_info|default:"false"|escapejs }}');
|
||||||
$scope.totalSites = {{ total_sites|default:"0"|safe }};
|
$scope.totalSites = parseInt('{{ total_sites|default:"0"|escapejs }}');
|
||||||
$scope.userId = {{ debug_info.user_id|default:"0"|safe }};
|
$scope.userId = parseInt('{{ debug_info.user_id|default:"0"|escapejs }}');
|
||||||
$scope.isAdmin = {{ debug_info.is_admin|default:"0"|safe }};
|
$scope.isAdmin = JSON.parse('{{ debug_info.is_admin|default:"false"|escapejs }}');
|
||||||
$scope.wpSitesCount = {{ debug_info.wp_sites_count|default:"0"|safe }};
|
$scope.wpSitesCount = parseInt('{{ debug_info.wp_sites_count|default:"0"|escapejs }}');
|
||||||
|
|
||||||
$scope.deleteWPSite = function(site) {
|
$scope.deleteWPSite = function(site) {
|
||||||
DeleteWPNow("{% url 'ListWPSites' %}?DeleteID=" + site.id);
|
DeleteWPNow("{% url 'ListWPSites' %}?DeleteID=" + site.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user