File tree 5 files changed +24
-5
lines changed
5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ <h1 class="uk-h2 uk-margin text-foreground">
38
38
< div class ="uk-navbar-right ">
39
39
< ul class ="uk-navbar-nav uk-margin-medium-right " style ="gap: 0.5rem; ">
40
40
41
-
41
+ {% yc_demo as yc_demo %}
42
+ {% if not yc_demo %}
42
43
43
44
< a href ="# " onclick ="page_load('{% url 'control_element' id=control_library_with_version %}');event.preventDefault(); " class ="uk-button uk-button{% if sub_page_title == 'Home' %}-primary{% else %}-default{% endif %} "> < span uk-icon ="home " class ="uk-margin-small-right "> </ span > Home</ a >
44
45
@@ -55,7 +56,7 @@ <h1 class="uk-h2 uk-margin text-foreground">
55
56
56
57
< a href ="# " onclick ="page_load('{% url 'control_element_settings' id=control_library_with_version %}');event.preventDefault(); " class ="uk-button uk-button{% if sub_page_title == 'Settings' %}-primary{% else %}-default{% endif %} "> < span uk-icon ="settings " class ="uk-margin-small-right "> </ span > Settings</ a >
57
58
58
-
59
+ {% endif %}
59
60
60
61
</ ul >
61
62
</ div >
Original file line number Diff line number Diff line change 53
53
< div class ="uk-navbar-right ">
54
54
< ul class ="uk-navbar-nav uk-margin-medium-right " style ="gap: 0.5rem; ">
55
55
56
- {% if value == False %}
56
+ {% if value == False %}
57
57
58
58
< a href ="# " onclick ="page_load('{% url 'control_element' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Home "> < span uk-icon ="home "> </ span > </ a >
59
59
60
60
61
+
62
+ {% yc_demo as yc_demo %}
63
+ {% if not yc_demo %}
61
64
< a href ="# " onclick ="page_load('{% url 'control_element_commits' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Commits "> < span uk-icon ="push "> </ span > </ a >
62
65
< a href ="# " onclick ="page_load('{% url 'control_element_runs' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Run History "> < span uk-icon ="server "> </ span > </ a >
63
66
< a href ="# " onclick ="page_load('{% url 'control_element_dependency' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Dependency "> < span uk-icon ="thumbnails "> </ span > </ a >
64
67
< a href ="# " onclick ="page_load('{% url 'control_element_settings' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Settings "> < span uk-icon ="settings "> </ span > </ a >
68
+ {% endif %}
69
+
65
70
{% else %}
66
71
< a href ="# " onclick ="page_load('{% url 'control_library' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Home "> < span uk-icon ="home "> </ span > </ a >
72
+
73
+ {% yc_demo as yc_demo %}
74
+ {% if not yc_demo %}
67
75
< a href ="# " onclick ="page_load('{% url 'control_library_settings' id=key %}');event.preventDefault(); " class ="uk-button uk-button-default " style ="width: 1px; " uk-tooltip ="Settings "> < span uk-icon ="settings "> </ span > </ a >
68
76
{% endif %}
77
+
78
+ {% endif %}
69
79
70
80
71
81
</ ul >
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ <h1 class="uk-h2 uk-margin text-foreground">
30
30
< div class ="uk-navbar-right ">
31
31
< ul class ="uk-navbar-nav uk-margin-medium-right " style ="gap: 0.5rem; ">
32
32
33
+ {% yc_demo as yc_demo %}
34
+ {% if not yc_demo %}
35
+
36
+
33
37
< a href ="# " onclick ="page_load('{% url 'control_library' id=control_library_with_version %}');event.preventDefault(); " class ="uk-button uk-button{% if sub_page_title == 'Home' %}-primary{% else %}-default{% endif %} "> < span uk-icon ="home " class ="uk-margin-small-right "> </ span > home</ a >
34
38
35
39
@@ -40,7 +44,7 @@ <h1 class="uk-h2 uk-margin text-foreground">
40
44
< a href ="# " onclick ="page_load('{% url 'control_library_settings' id=control_library_with_version %}');event.preventDefault(); " class ="uk-button uk-button{% if sub_page_title == 'Settings' %}-primary{% else %}-default{% endif %} "> < span uk-icon ="settings " class ="uk-margin-small-right "> </ span > Settings</ a >
41
45
42
46
43
-
47
+ {%endif%}
44
48
45
49
46
50
</ ul >
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ def debug_mode():
19
19
def demo_mode ():
20
20
return settings .DEMO_MODE
21
21
22
+ @register .simple_tag (name = "yc_mode" )
23
+ def yc_mode ():
24
+ return settings .YC_MODE
25
+
22
26
23
27
@register .simple_tag (name = "sentry" )
24
28
def sentry ():
Original file line number Diff line number Diff line change 229
229
DEBUG = debug_mode
230
230
231
231
DEMO_MODE = os .environ .get ("demo_mode" , "false" ).lower () == "true"
232
-
232
+ YC_MODE = os . environ . get ( "YC_MODE" , "false" ). lower () == "true"
233
233
234
234
# TODO: Adding csrf protection
235
235
You can’t perform that action at this time.
0 commit comments