Skip to content

Commit

Permalink
Füge Controller und Ansicht für die Batch-Löschung hinzu und aktualis…
Browse files Browse the repository at this point in the history
…iere die Sidebar
  • Loading branch information
wolfganggreschus committed Jan 30, 2025
1 parent 9748697 commit 624fe89
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
27 changes: 27 additions & 0 deletions controllers/batch-deletion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* One Controller per layout view
*/

// const _ = require('lodash');
const express = require('express');
const router = express.Router();
const authHelper = require('../helpers/authentication');
const { api } = require('../api');
// const moment = require('moment');
// moment.locale('de');

// secure routes
router.use(authHelper.authChecker);

router.get('/', function (req, res, next) {
res.render('batch-deletion/batch-deletion', {
title: 'Löschung',
user: res.locals.currentUser,
themeTitle: process.env.SC_NAV_TITLE || 'Schul-Cloud'
});

});



module.exports = router;
1 change: 1 addition & 0 deletions controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ router.use('/tools', require('./tools'));
router.use('/ctltools', require('./ctltools'));
router.use('/storageproviders', require('./storageproviders'));
router.use('/base64files/', require('./base64files'));
router.use('/batch-deletion/', require('./batch-deletion'));

module.exports = router;
5 changes: 5 additions & 0 deletions helpers/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ const restrictSidebar = (req, res) => {
icon: 'server',
link: '/storageproviders/'
},
{
name: 'Löschung',
icon: 'trash',
link: '/foo/'
},
];

res.locals.sidebarItems = res.locals.sidebarItems.filter((item) => item.enabled == null || item.enabled);
Expand Down
2 changes: 2 additions & 0 deletions static/styles/batch-deletion/batch-deletion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import '../lib/colors.scss';
@import '../lib/bootstrap/scss/bootstrap-flex';
7 changes: 7 additions & 0 deletions views/batch-deletion/batch-deletion.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{#extend "lib/loggedin"}}

{{#content "page"}}
<div> Hallo Welt </div>
{{/content}}

{{/extend}}
Empty file.

0 comments on commit 624fe89

Please sign in to comment.