mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 15:23:05 +00:00
fix edit wiki url (#6085)
This commit is contained in:
parent
5ece5934ea
commit
b8e490d594
@ -72,7 +72,7 @@ class WikiListItem extends Component {
|
||||
let fileIconUrl = Utils.getDefaultLibIconUrl(false);
|
||||
let isOldVersion = wiki.version !== 'v2';
|
||||
let publishedUrl = `${siteRoot}published/${encodeURIComponent(wiki.slug)}/`;
|
||||
let editUrl = `${siteRoot}edit-wiki/${wiki.id}/`;
|
||||
let editUrl = `${siteRoot}wikis/${wiki.id}/`;
|
||||
|
||||
const desktopItem = (
|
||||
<tr
|
||||
|
@ -74,7 +74,7 @@ class Wiki extends Component {
|
||||
}
|
||||
|
||||
handlePath = () => {
|
||||
return isEditWiki ? 'edit-wiki/' : 'published/';
|
||||
return isEditWiki ? 'wikis/' : 'published/';
|
||||
};
|
||||
|
||||
getWikiConfig = () => {
|
||||
|
@ -22,7 +22,7 @@ export default class WikiLeftBar extends React.Component {
|
||||
}
|
||||
|
||||
openPreviewApp = () => {
|
||||
window.open(window.location.href.replace('/edit-wiki/', '/published/'));
|
||||
window.open(window.location.href.replace('/wikis/', '/published/'));
|
||||
};
|
||||
|
||||
openAppSettingsDialog = () => {
|
||||
|
@ -203,7 +203,7 @@ from seahub.ocm.settings import OCM_ENDPOINT
|
||||
|
||||
from seahub.ai.apis import LibrarySdocIndexes, Search, LibrarySdocIndex, TaskStatus, \
|
||||
LibraryIndexState, QuestionAnsweringSearchInLibrary, FileDownloadToken
|
||||
from seahub.wiki2.views import edit_wiki
|
||||
from seahub.wiki2.views import wiki_view
|
||||
from seahub.api2.endpoints.wiki2 import Wikis2View, Wiki2View, Wiki2ConfigView, Wiki2PagesDirView, Wiki2PageContentView
|
||||
|
||||
urlpatterns = [
|
||||
@ -706,7 +706,7 @@ urlpatterns = [
|
||||
re_path(r'^api/v2.1/admin/invitations/$', AdminInvitations.as_view(), name='api-v2.1-admin-invitations'),
|
||||
re_path(r'^api/v2.1/admin/invitations/(?P<token>[a-f0-9]{32})/$', AdminInvitation.as_view(), name='api-v2.1-admin-invitation'),
|
||||
|
||||
re_path(r'^edit-wiki/(?P<wiki_id>[^/]+)/(?P<file_path>.*)$', edit_wiki, name='edit_wiki'),
|
||||
re_path(r'^wikis/(?P<wiki_id>[^/]+)/(?P<file_path>.*)$', wiki_view, name='wiki'),
|
||||
|
||||
path('avatar/', include('seahub.avatar.urls')),
|
||||
path('notice/', include('seahub.notifications.urls')),
|
||||
|
@ -24,7 +24,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@login_required
|
||||
def edit_wiki(request, wiki_id, file_path):
|
||||
def wiki_view(request, wiki_id, file_path):
|
||||
""" edit wiki page. for wiki2
|
||||
"""
|
||||
# get wiki object or 404
|
||||
|
Loading…
Reference in New Issue
Block a user