Commit f7e6b9af authored by Gaurav Kapoor's avatar Gaurav Kapoor Committed by Gaurav Kapoor
Browse files

Issue #3269407 by gaurav.kapoor: Add counter dashboard for showing statistics to administrators

parent 78a6951a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3,3 +3,13 @@ counter.custom:
  css:
    theme:    
      css/counter.css: {}

counter.dashboard:
  version: 1.x
  css:
    base:    
      'https://www.w3schools.com/w3css/4/w3.css': { type: external }
    theme:
      'https://fonts.googleapis.com/css?family=Raleway': { type: external }
      'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css': { type: external, minified: true }
      css/counter-dashboard.css: {}
+7 −0
Original line number Diff line number Diff line
@@ -24,3 +24,10 @@ counter.initial:
  route_name: counter.initial
  weight: -15
  parent: counter.counter_settings

counter.dashboard:
  title: 'Counter Dashboard'
  description: 'Check counter dashboard.'
  route_name: counter.dashboard
  weight: -14
  parent: counter.counter_settings
+16 −0
Original line number Diff line number Diff line
@@ -44,6 +44,22 @@ function counter_theme($existing, $type, $theme, $path) {
        'statistic_year' => NULL,
      ],
    ],
    'counter_dashboard' => [
      'variables' => [
        'site_counter' => NULL,
        'unique_visitor' => NULL,
        'registered_user' => NULL,
        'unregistered_user' => NULL,
        'blocked_user' => NULL,
        'published_nodes' => NULL,
        'unpublished_nodes' => NULL,
        'counter_since' => NULL,
        'statistic_today' => NULL,
        'statistic_week' => NULL,
        'statistic_month' => NULL,
        'statistic_year' => NULL,
      ],
    ],
  ];
}

+8 −0
Original line number Diff line number Diff line
@@ -29,3 +29,11 @@ counter.initial:
    _title: 'Initial Counter'
  requirements:
    _permission: 'administer counter'

counter.dashboard:
  path: '/admin/config/counter/dashboard'
  defaults:
    _controller: '\Drupal\counter\Controller\CounterDashboard::page'
    _title: 'Counter Dashboard'
  requirements:
    _permission: 'administer counter'
+8 −0
Original line number Diff line number Diff line
h3,
h4 {
  font-family: "Raleway", sans-serif;
}

.w3-container {
  padding-top: 22px;
}
Loading