Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
Revert "fixed urls for frontend. Removed '/#'"
Browse files Browse the repository at this point in the history
This reverts commit e2edf42.
  • Loading branch information
inkhey committed Jul 2, 2018
1 parent 6f2cdfb commit 1e31c58
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions tracim/models/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
@param main_route: the route of the frontend "home" screen of
the application. For exemple, if you have an application
called "calendar", the main route will be something
like /workspace/{wid}/calendar.
like /#/workspace/{wid}/calendar.
"""
self.label = label
self.slug = slug
Expand All @@ -45,7 +45,7 @@ def __init__(
hexcolor='#757575',
is_active=True,
config={},
main_route='/workspaces/{workspace_id}/calendar',
main_route='/#/workspaces/{workspace_id}/calendar',
)

thread = Application(
Expand All @@ -55,7 +55,7 @@ def __init__(
hexcolor='#ad4cf9',
is_active=True,
config={},
main_route='/workspaces/{workspace_id}/contents?type=thread',
main_route='/#/workspaces/{workspace_id}/contents?type=thread',

)

Expand All @@ -66,7 +66,7 @@ def __init__(
hexcolor='#FF9900',
is_active=True,
config={},
main_route='/workspaces/{workspace_id}/contents?type=file',
main_route='/#/workspaces/{workspace_id}/contents?type=file',
)

markdownpluspage = Application(
Expand All @@ -76,7 +76,7 @@ def __init__(
hexcolor='#f12d2d',
is_active=True,
config={},
main_route='/workspaces/{workspace_id}/contents?type=markdownpluspage',
main_route='/#/workspaces/{workspace_id}/contents?type=markdownpluspage',
)

html_documents = Application(
Expand All @@ -86,7 +86,7 @@ def __init__(
hexcolor='#3f52e3',
is_active=True,
config={},
main_route='/workspaces/{workspace_id}/contents?type=html-documents',
main_route='/#/workspaces/{workspace_id}/contents?type=html-documents',
)
# TODO - G.M - 08-06-2018 - This is hardcoded lists of app, make this dynamic.
# List of applications
Expand Down
4 changes: 2 additions & 2 deletions tracim/models/workspace_menu_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def __init__(
dashboard_menu_entry = WorkspaceMenuEntry(
slug='dashboard',
label='Dashboard',
route='/workspaces/{workspace_id}/dashboard',
route='/#/workspaces/{workspace_id}/dashboard',
hexcolor='#252525',
fa_icon="",
)
all_content_menu_entry = WorkspaceMenuEntry(
slug="contents/all",
label="All Contents",
route="/workspaces/{workspace_id}/contents",
route="/#/workspaces/{workspace_id}/contents",
hexcolor="#fdfdfd",
fa_icon="",
)
Expand Down
14 changes: 7 additions & 7 deletions tracim/tests/functional/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,49 +36,49 @@ def test_api__get_user_workspaces__ok_200__nominal_case(self):
sidebar_entry = workspace['sidebar_entries'][0]
assert sidebar_entry['slug'] == 'dashboard'
assert sidebar_entry['label'] == 'Dashboard'
assert sidebar_entry['route'] == '/workspaces/1/dashboard' # nopep8
assert sidebar_entry['route'] == '/#/workspaces/1/dashboard' # nopep8
assert sidebar_entry['hexcolor'] == "#252525"
assert sidebar_entry['fa_icon'] == ""

sidebar_entry = workspace['sidebar_entries'][1]
assert sidebar_entry['slug'] == 'contents/all'
assert sidebar_entry['label'] == 'All Contents'
assert sidebar_entry['route'] == "/workspaces/1/contents" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents" # nopep8
assert sidebar_entry['hexcolor'] == "#fdfdfd"
assert sidebar_entry['fa_icon'] == ""

sidebar_entry = workspace['sidebar_entries'][2]
assert sidebar_entry['slug'] == 'contents/html-documents'
assert sidebar_entry['label'] == 'Text Documents'
assert sidebar_entry['route'] == '/workspaces/1/contents?type=html-documents' # nopep8
assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=html-documents' # nopep8
assert sidebar_entry['hexcolor'] == "#3f52e3"
assert sidebar_entry['fa_icon'] == "file-text-o"

sidebar_entry = workspace['sidebar_entries'][3]
assert sidebar_entry['slug'] == 'contents/markdownpluspage'
assert sidebar_entry['label'] == 'Markdown Plus Documents'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=markdownpluspage" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage" # nopep8
assert sidebar_entry['hexcolor'] == "#f12d2d"
assert sidebar_entry['fa_icon'] == "file-code"

sidebar_entry = workspace['sidebar_entries'][4]
assert sidebar_entry['slug'] == 'contents/files'
assert sidebar_entry['label'] == 'Files'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=file" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=file" # nopep8
assert sidebar_entry['hexcolor'] == "#FF9900"
assert sidebar_entry['fa_icon'] == "paperclip"

sidebar_entry = workspace['sidebar_entries'][5]
assert sidebar_entry['slug'] == 'contents/threads'
assert sidebar_entry['label'] == 'Threads'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=thread" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=thread" # nopep8
assert sidebar_entry['hexcolor'] == "#ad4cf9"
assert sidebar_entry['fa_icon'] == "comments-o"

sidebar_entry = workspace['sidebar_entries'][6]
assert sidebar_entry['slug'] == 'calendar'
assert sidebar_entry['label'] == 'Calendar'
assert sidebar_entry['route'] == "/workspaces/1/calendar" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/calendar" # nopep8
assert sidebar_entry['hexcolor'] == "#757575"
assert sidebar_entry['fa_icon'] == "calendar-alt"

Expand Down
14 changes: 7 additions & 7 deletions tracim/tests/functional/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,49 @@ def test_api__get_workspace__ok_200__nominal_case(self) -> None:
sidebar_entry = workspace['sidebar_entries'][0]
assert sidebar_entry['slug'] == 'dashboard'
assert sidebar_entry['label'] == 'Dashboard'
assert sidebar_entry['route'] == '/workspaces/1/dashboard' # nopep8
assert sidebar_entry['route'] == '/#/workspaces/1/dashboard' # nopep8
assert sidebar_entry['hexcolor'] == "#252525"
assert sidebar_entry['fa_icon'] == ""

sidebar_entry = workspace['sidebar_entries'][1]
assert sidebar_entry['slug'] == 'contents/all'
assert sidebar_entry['label'] == 'All Contents'
assert sidebar_entry['route'] == "/workspaces/1/contents" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents" # nopep8
assert sidebar_entry['hexcolor'] == "#fdfdfd"
assert sidebar_entry['fa_icon'] == ""

sidebar_entry = workspace['sidebar_entries'][2]
assert sidebar_entry['slug'] == 'contents/html-documents'
assert sidebar_entry['label'] == 'Text Documents'
assert sidebar_entry['route'] == '/workspaces/1/contents?type=html-documents' # nopep8
assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=html-documents' # nopep8
assert sidebar_entry['hexcolor'] == "#3f52e3"
assert sidebar_entry['fa_icon'] == "file-text-o"

sidebar_entry = workspace['sidebar_entries'][3]
assert sidebar_entry['slug'] == 'contents/markdownpluspage'
assert sidebar_entry['label'] == 'Markdown Plus Documents'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=markdownpluspage" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage" # nopep8
assert sidebar_entry['hexcolor'] == "#f12d2d"
assert sidebar_entry['fa_icon'] == "file-code"

sidebar_entry = workspace['sidebar_entries'][4]
assert sidebar_entry['slug'] == 'contents/files'
assert sidebar_entry['label'] == 'Files'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=file" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=file" # nopep8
assert sidebar_entry['hexcolor'] == "#FF9900"
assert sidebar_entry['fa_icon'] == "paperclip"

sidebar_entry = workspace['sidebar_entries'][5]
assert sidebar_entry['slug'] == 'contents/threads'
assert sidebar_entry['label'] == 'Threads'
assert sidebar_entry['route'] == "/workspaces/1/contents?type=thread" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=thread" # nopep8
assert sidebar_entry['hexcolor'] == "#ad4cf9"
assert sidebar_entry['fa_icon'] == "comments-o"

sidebar_entry = workspace['sidebar_entries'][6]
assert sidebar_entry['slug'] == 'calendar'
assert sidebar_entry['label'] == 'Calendar'
assert sidebar_entry['route'] == "/workspaces/1/calendar" # nopep8
assert sidebar_entry['route'] == "/#/workspaces/1/calendar" # nopep8
assert sidebar_entry['hexcolor'] == "#757575"
assert sidebar_entry['fa_icon'] == "calendar-alt"

Expand Down

0 comments on commit 1e31c58

Please sign in to comment.