Browse Source

fixed urls for frontend. Removed '/#'

Skylsmoi 6 years ago
parent
commit
e2edf427db

+ 6 - 6
tracim/models/applications.py View File

@@ -26,7 +26,7 @@ class Application(object):
26 26
         @param main_route: the route of the frontend "home" screen of
27 27
         the application. For exemple, if you have an application
28 28
         called "calendar", the main route will be something
29
-        like /#/workspace/{wid}/calendar.
29
+        like /workspace/{wid}/calendar.
30 30
         """
31 31
         self.label = label
32 32
         self.slug = slug
@@ -45,7 +45,7 @@ calendar = Application(
45 45
     hexcolor='#757575',
46 46
     is_active=True,
47 47
     config={},
48
-    main_route='/#/workspaces/{workspace_id}/calendar',
48
+    main_route='/workspaces/{workspace_id}/calendar',
49 49
 )
50 50
 
51 51
 thread = Application(
@@ -55,7 +55,7 @@ thread = Application(
55 55
     hexcolor='#ad4cf9',
56 56
     is_active=True,
57 57
     config={},
58
-    main_route='/#/workspaces/{workspace_id}/contents?type=thread',
58
+    main_route='/workspaces/{workspace_id}/contents?type=thread',
59 59
 
60 60
 )
61 61
 
@@ -66,7 +66,7 @@ _file = Application(
66 66
     hexcolor='#FF9900',
67 67
     is_active=True,
68 68
     config={},
69
-    main_route='/#/workspaces/{workspace_id}/contents?type=file',
69
+    main_route='/workspaces/{workspace_id}/contents?type=file',
70 70
 )
71 71
 
72 72
 markdownpluspage = Application(
@@ -76,7 +76,7 @@ markdownpluspage = Application(
76 76
     hexcolor='#f12d2d',
77 77
     is_active=True,
78 78
     config={},
79
-    main_route='/#/workspaces/{workspace_id}/contents?type=markdownpluspage',
79
+    main_route='/workspaces/{workspace_id}/contents?type=markdownpluspage',
80 80
 )
81 81
 
82 82
 html_documents = Application(
@@ -86,7 +86,7 @@ html_documents = Application(
86 86
     hexcolor='#3f52e3',
87 87
     is_active=True,
88 88
     config={},
89
-    main_route='/#/workspaces/{workspace_id}/contents?type=html-documents',
89
+    main_route='/workspaces/{workspace_id}/contents?type=html-documents',
90 90
 )
91 91
 # TODO - G.M - 08-06-2018 - This is hardcoded lists of app, make this dynamic.
92 92
 # List of applications

+ 2 - 2
tracim/models/workspace_menu_entries.py View File

@@ -27,14 +27,14 @@ class WorkspaceMenuEntry(object):
27 27
 dashboard_menu_entry = WorkspaceMenuEntry(
28 28
   slug='dashboard',
29 29
   label='Dashboard',
30
-  route='/#/workspaces/{workspace_id}/dashboard',
30
+  route='/workspaces/{workspace_id}/dashboard',
31 31
   hexcolor='#252525',
32 32
   fa_icon="",
33 33
 )
34 34
 all_content_menu_entry = WorkspaceMenuEntry(
35 35
   slug="contents/all",
36 36
   label="All Contents",
37
-  route="/#/workspaces/{workspace_id}/contents",
37
+  route="/workspaces/{workspace_id}/contents",
38 38
   hexcolor="#fdfdfd",
39 39
   fa_icon="",
40 40
 )

+ 7 - 7
tracim/tests/functional/test_user.py View File

@@ -36,49 +36,49 @@ class TestUserWorkspaceEndpoint(FunctionalTest):
36 36
         sidebar_entry = workspace['sidebar_entries'][0]
37 37
         assert sidebar_entry['slug'] == 'dashboard'
38 38
         assert sidebar_entry['label'] == 'Dashboard'
39
-        assert sidebar_entry['route'] == '/#/workspaces/1/dashboard'  # nopep8
39
+        assert sidebar_entry['route'] == '/workspaces/1/dashboard'  # nopep8
40 40
         assert sidebar_entry['hexcolor'] == "#252525"
41 41
         assert sidebar_entry['fa_icon'] == ""
42 42
 
43 43
         sidebar_entry = workspace['sidebar_entries'][1]
44 44
         assert sidebar_entry['slug'] == 'contents/all'
45 45
         assert sidebar_entry['label'] == 'All Contents'
46
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents"  # nopep8
46
+        assert sidebar_entry['route'] == "/workspaces/1/contents"  # nopep8
47 47
         assert sidebar_entry['hexcolor'] == "#fdfdfd"
48 48
         assert sidebar_entry['fa_icon'] == ""
49 49
 
50 50
         sidebar_entry = workspace['sidebar_entries'][2]
51 51
         assert sidebar_entry['slug'] == 'contents/html-documents'
52 52
         assert sidebar_entry['label'] == 'Text Documents'
53
-        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=html-documents'  # nopep8
53
+        assert sidebar_entry['route'] == '/workspaces/1/contents?type=html-documents'  # nopep8
54 54
         assert sidebar_entry['hexcolor'] == "#3f52e3"
55 55
         assert sidebar_entry['fa_icon'] == "file-text-o"
56 56
 
57 57
         sidebar_entry = workspace['sidebar_entries'][3]
58 58
         assert sidebar_entry['slug'] == 'contents/markdownpluspage'
59 59
         assert sidebar_entry['label'] == 'Markdown Plus Documents'
60
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage"    # nopep8
60
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=markdownpluspage"    # nopep8
61 61
         assert sidebar_entry['hexcolor'] == "#f12d2d"
62 62
         assert sidebar_entry['fa_icon'] == "file-code"
63 63
 
64 64
         sidebar_entry = workspace['sidebar_entries'][4]
65 65
         assert sidebar_entry['slug'] == 'contents/files'
66 66
         assert sidebar_entry['label'] == 'Files'
67
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=file"  # nopep8
67
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=file"  # nopep8
68 68
         assert sidebar_entry['hexcolor'] == "#FF9900"
69 69
         assert sidebar_entry['fa_icon'] == "paperclip"
70 70
 
71 71
         sidebar_entry = workspace['sidebar_entries'][5]
72 72
         assert sidebar_entry['slug'] == 'contents/threads'
73 73
         assert sidebar_entry['label'] == 'Threads'
74
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=thread"  # nopep8
74
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=thread"  # nopep8
75 75
         assert sidebar_entry['hexcolor'] == "#ad4cf9"
76 76
         assert sidebar_entry['fa_icon'] == "comments-o"
77 77
 
78 78
         sidebar_entry = workspace['sidebar_entries'][6]
79 79
         assert sidebar_entry['slug'] == 'calendar'
80 80
         assert sidebar_entry['label'] == 'Calendar'
81
-        assert sidebar_entry['route'] == "/#/workspaces/1/calendar"  # nopep8
81
+        assert sidebar_entry['route'] == "/workspaces/1/calendar"  # nopep8
82 82
         assert sidebar_entry['hexcolor'] == "#757575"
83 83
         assert sidebar_entry['fa_icon'] == "calendar-alt"
84 84
 

+ 7 - 7
tracim/tests/functional/test_workspaces.py View File

@@ -37,49 +37,49 @@ class TestWorkspaceEndpoint(FunctionalTest):
37 37
         sidebar_entry = workspace['sidebar_entries'][0]
38 38
         assert sidebar_entry['slug'] == 'dashboard'
39 39
         assert sidebar_entry['label'] == 'Dashboard'
40
-        assert sidebar_entry['route'] == '/#/workspaces/1/dashboard'  # nopep8
40
+        assert sidebar_entry['route'] == '/workspaces/1/dashboard'  # nopep8
41 41
         assert sidebar_entry['hexcolor'] == "#252525"
42 42
         assert sidebar_entry['fa_icon'] == ""
43 43
 
44 44
         sidebar_entry = workspace['sidebar_entries'][1]
45 45
         assert sidebar_entry['slug'] == 'contents/all'
46 46
         assert sidebar_entry['label'] == 'All Contents'
47
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents"  # nopep8
47
+        assert sidebar_entry['route'] == "/workspaces/1/contents"  # nopep8
48 48
         assert sidebar_entry['hexcolor'] == "#fdfdfd"
49 49
         assert sidebar_entry['fa_icon'] == ""
50 50
 
51 51
         sidebar_entry = workspace['sidebar_entries'][2]
52 52
         assert sidebar_entry['slug'] == 'contents/html-documents'
53 53
         assert sidebar_entry['label'] == 'Text Documents'
54
-        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=html-documents'  # nopep8
54
+        assert sidebar_entry['route'] == '/workspaces/1/contents?type=html-documents'  # nopep8
55 55
         assert sidebar_entry['hexcolor'] == "#3f52e3"
56 56
         assert sidebar_entry['fa_icon'] == "file-text-o"
57 57
 
58 58
         sidebar_entry = workspace['sidebar_entries'][3]
59 59
         assert sidebar_entry['slug'] == 'contents/markdownpluspage'
60 60
         assert sidebar_entry['label'] == 'Markdown Plus Documents'
61
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage"    # nopep8
61
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=markdownpluspage"    # nopep8
62 62
         assert sidebar_entry['hexcolor'] == "#f12d2d"
63 63
         assert sidebar_entry['fa_icon'] == "file-code"
64 64
 
65 65
         sidebar_entry = workspace['sidebar_entries'][4]
66 66
         assert sidebar_entry['slug'] == 'contents/files'
67 67
         assert sidebar_entry['label'] == 'Files'
68
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=file"  # nopep8
68
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=file"  # nopep8
69 69
         assert sidebar_entry['hexcolor'] == "#FF9900"
70 70
         assert sidebar_entry['fa_icon'] == "paperclip"
71 71
 
72 72
         sidebar_entry = workspace['sidebar_entries'][5]
73 73
         assert sidebar_entry['slug'] == 'contents/threads'
74 74
         assert sidebar_entry['label'] == 'Threads'
75
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=thread"  # nopep8
75
+        assert sidebar_entry['route'] == "/workspaces/1/contents?type=thread"  # nopep8
76 76
         assert sidebar_entry['hexcolor'] == "#ad4cf9"
77 77
         assert sidebar_entry['fa_icon'] == "comments-o"
78 78
 
79 79
         sidebar_entry = workspace['sidebar_entries'][6]
80 80
         assert sidebar_entry['slug'] == 'calendar'
81 81
         assert sidebar_entry['label'] == 'Calendar'
82
-        assert sidebar_entry['route'] == "/#/workspaces/1/calendar"  # nopep8
82
+        assert sidebar_entry['route'] == "/workspaces/1/calendar"  # nopep8
83 83
         assert sidebar_entry['hexcolor'] == "#757575"
84 84
         assert sidebar_entry['fa_icon'] == "calendar-alt"
85 85