From b39a5bbbd610ba30651218658caaec1c86d6bca1 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 20 Apr 2023 01:50:10 +0800 Subject: Make wiki title supports dashes and improve wiki name related features (#24143) Close #7570 1. Clearly define the wiki path behaviors, see `services/wiki/wiki_path.go` and tests 2. Keep compatibility with old contents 3. Allow to use dashes in titles, eg: "2000-01-02 Meeting record" 4. Add a "Pages" link in the dropdown, otherwise users can't go to the Pages page easily. 5. Add a "View original git file" link in the Pages list, even if some file names are broken, users still have a chance to edit or remove it, without cloning the wiki repo to local. 6. Fix 500 error when the name contains prefix spaces. This PR also introduces the ability to support sub-directories, but it can't be done at the moment due to there are a lot of legacy wiki data, which use "%2F" in file names. ![image](https://user-images.githubusercontent.com/2114189/232239004-3359d7b9-7bf3-4ff3-8446-bfb0e79645dd.png) ![image](https://user-images.githubusercontent.com/2114189/232239020-74b92c72-bf73-4377-a319-1c85609f82b1.png) Co-authored-by: Giteabot --- web_src/js/features/repo-legacy.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'web_src/js/features/repo-legacy.js') diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 2e39d3762f..f919ca02f1 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -463,18 +463,12 @@ export function initRepository() { return; } - // File list and commits if ($('.repository.file.list').length > 0 || $('.branch-dropdown').length > 0 || $('.repository.commits').length > 0 || $('.repository.release').length > 0) { initRepoBranchTagSelector('.js-branch-tag-selector'); } - // Wiki - if ($('.repository.wiki.view').length > 0) { - initRepoCommonFilterSearchDropdown('.choose.page .dropdown'); - } - // Options if ($('.repository.settings.options').length > 0) { // Enable or select internal/external wiki system and issue tracker. -- cgit v1.2.3