aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Schneider <schneider@data-quest.de>2025-10-10 16:52:02 +0200
committerFinn Schneider <schneider@data-quest.de>2025-10-10 16:52:02 +0200
commit9ce2b6577361ed180b1d5a2fd8c8a3d4164fbb31 (patch)
tree4a1e3fb3bdb3c48ce595b9e06118d10bbfcb91db
parentd41139671a71767e5839789152f68855001203ff (diff)
re #5845 quicklinks remove
-rw-r--r--app/controllers/course/wiki.php42
-rw-r--r--db/migrations/6.2.2_remove_wiki_quicklinks.php29
-rw-r--r--resources/assets/stylesheets/scss/wiki.scss34
3 files changed, 29 insertions, 76 deletions
diff --git a/app/controllers/course/wiki.php b/app/controllers/course/wiki.php
index cd73b99..0ebee8f 100644
--- a/app/controllers/course/wiki.php
+++ b/app/controllers/course/wiki.php
@@ -44,33 +44,6 @@ class Course_WikiController extends AuthenticatedController
Navigation::activateItem('/course/wiki/start');
}
- if (!$this->page->isNew()) {
- // Table of Contents/QuickLinks
- $widget = Sidebar::Get()->addWidget(new ListWidget());
- $widget->setTitle(_('QuickLinks'));
- $quicklinks = WikiPage::findOneBySQL("`name` = 'toc' AND `range_id` = ?", [$this->range->id]);
- $toc_content = $quicklinks ? '<div class="wikitoc" id="00toc">' . wikiReady($quicklinks['content'], true, $this->range->id) . '</div>' : '';
- $toc_content_empty = !trim(strip_tags($toc_content));
- if (
- (!$quicklinks && $GLOBALS['perm']->have_studip_perm($this->range->getConfiguration()->WIKI_CREATE_PERMISSION, $this->range->id))
- || ($quicklinks && $quicklinks->isEditable())
- ) {
- $extra = sprintf(
- '<a href="%s">%s</a>',
- URLHelper::getLink('dispatch.php/course/wiki/edit_toc'),
- $toc_content_empty
- ? Icon::create('add')->asSvg(['title' => _('Erstellen')])
- : Icon::create('edit')->asSvg(['title' => _('Bearbeiten')])
- );
- $widget->setExtra($extra);
- }
- $element = new WidgetElement($toc_content_empty ? _('Keine QuickLinks vorhanden') : $toc_content);
- if (!$toc_content_empty) {
- $element->icon = Icon::create('link-intern');
- }
- $widget->addElement($element);
- }
-
$this->edit_perms = $this->range->getConfiguration()->WIKI_CREATE_PERMISSION;
if (
$GLOBALS['perm']->have_studip_perm('autor', $this->range->id)
@@ -726,21 +699,6 @@ class Course_WikiController extends AuthenticatedController
$this->redirect($this->pageURL($page));
}
- public function edit_toc_action()
- {
- $quicklinks = WikiPage::findOneBySQL(
- "`name` = 'toc' AND `range_id` = ?",
- [$this->range->id]
- );
- if (!$quicklinks) {
- $quicklinks = WikiPage::create([
- 'range_id' => $this->range->id,
- 'name' => 'toc'
- ]);
- }
- $this->redirect($this->editURL($quicklinks));
- }
-
public function newpages_action()
{
Navigation::activateItem('/course/wiki/listnew');
diff --git a/db/migrations/6.2.2_remove_wiki_quicklinks.php b/db/migrations/6.2.2_remove_wiki_quicklinks.php
new file mode 100644
index 0000000..f65f3e2
--- /dev/null
+++ b/db/migrations/6.2.2_remove_wiki_quicklinks.php
@@ -0,0 +1,29 @@
+<?php
+
+class RemoveWikiQuicklinks extends Migration
+{
+ function description(): string
+ {
+ return 'Removes quicklink steps from wiki helptours.';
+ }
+
+ function up(): void
+ {
+ DBManager::get()->exec(
+ "DELETE FROM `help_tour_steps`
+ WHERE `tour_id` = '4d41c9760a3248313236af202275107b' OR `tour_id`= '5d41c9760a3248313236af202275107b'
+ AND `step` = 7 OR `step` = 8"
+ );
+ }
+
+ function down(): void
+ {
+ DBManager::get()->exec(
+ "INSERT INTO `help_tour_steps` VALUES
+ ('4d41c9760a3248313236af202275107b',7,'QuickLinks','Dieser Bildschirmbereich zeigt eine Liste von QuickLinks (Verweisen) auf Wiki-Seiten. Ein Klick auf einen QuickLink öffnet die korrelierende Wiki-Seite. Deren Inhalt lässt sich mit Hilfe der Schaltflächen \"Bearbeiten\" und \"Löschen\" gestalten.','R',0,'#layout-sidebar SECTION:eq(0) DIV:eq(6) DIV:eq(0)','wiki.php','','','',1441276241,0),
+ ('4d41c9760a3248313236af202275107b',8,'QuickLinks bearbeiten','Über das Icon zum Bearbeiten von QuickLinks öffnet sich ein Editor.\r\n\r\nNeue QuickLinks lassen sich mit doppelten eckigen Klammern erstellen: [[Name]]. Das Löschen eines QuickLinks entfernt die korrelierende Seite aus der Liste.','R',0,'#layout-sidebar SECTION:eq(0) DIV:eq(6) DIV:eq(0)','wiki.php','','','root@localhost',1441276241,0),
+ ('5d41c9760a3248313236af202275107b',7,'QuickLinks','This box displays links, leading to other Wiki pages. Selecting a link will forward to the related page.','R',0,'#layout-sidebar SECTION:eq(0) DIV:eq(6) DIV:eq(0)','wiki.php','','','',1441276241,0),
+ ('5d41c9760a3248313236af202275107b',8,'Editing QuickLinks','A click on this icon will open an editor to edit the QuickLinks.\r\n\r\nEntering a name within double square brackets like [[name]] in the editor will create a new QuickLink leading to a correlating page. Deleting a QuickLink will cause its deletion in the QuickLink box.','R',0,'#layout-sidebar SECTION:eq(0) DIV:eq(6) DIV:eq(0)','wiki.php','','','root@localhost',1441276241,0)"
+ );
+ }
+}
diff --git a/resources/assets/stylesheets/scss/wiki.scss b/resources/assets/stylesheets/scss/wiki.scss
index f03ce6f..442e865 100644
--- a/resources/assets/stylesheets/scss/wiki.scss
+++ b/resources/assets/stylesheets/scss/wiki.scss
@@ -1,37 +1,3 @@
-div.wikitoc {
- font-size: 1em;
- margin-bottom: 5px;
-
- h1, h2, h3, h4 {
- color: var(--black);
- font-size: 1em;
- margin: 0 0 0 -10px;
- }
-
- ul {
- list-style: none;
- margin-bottom: 0;
- margin-top: 0;
- padding-left: 0;
-
- ul { padding-left: 10px; }
- ul ul { padding-left: 20px; }
- ul ul ul { padding-left: 30px; }
- }
-}
-
-div.wikitoc_editlink {
- font-size: 1em;
- margin-bottom: -10px;
- padding-top: 5px;
-}
-span.wikitoc_editlink {
- font-size: 75%;
-}
-
-span.wikitoc_toggler {
- font-size: 0.8em;
-}
textarea.wiki-editor {
display: block;
height: 250px;