11
11
{% block project_edit_content_header %}{% trans "Search Analytics" %}{% endblock %}
12
12
13
13
{% block project_edit_content %}
14
- {% if show_analytics %}
15
14
16
- < h3 > {% trans "Top queries" %}</ h3 >
17
- < div class ="module-list ">
18
- < div class ="module-list-wrapper ">
19
- < ul class ="long-list-overflow ">
20
- {% for query, count in queries %}
21
- < li class ="module-item ">
22
- {{ query }}
23
- < span class ="right quiet ">
24
- {{ count }} search{{ count|pluralize:"es" }}
25
- </ span >
26
- </ li >
27
- {% empty %}
28
- < li class ="module-item ">
29
- < p class ="quiet ">
30
- {% trans 'No date available.' %}
31
- </ p >
32
- </ li >
33
- {% endfor %}
34
- </ ul >
35
- </ div >
15
+ < h3 > {% trans "Top queries" %}</ h3 >
16
+ < div class ="module-list ">
17
+ < div class ="module-list-wrapper ">
18
+ < ul class ="long-list-overflow ">
19
+ {% for query, count in queries %}
20
+ < li class ="module-item ">
21
+ {{ query }}
22
+ < span class ="right quiet ">
23
+ {{ count }} search{{ count|pluralize:"es" }}
24
+ </ span >
25
+ </ li >
26
+ {% empty %}
27
+ < li class ="module-item ">
28
+ < p class ="quiet ">
29
+ {% trans 'No date available.' %}
30
+ </ p >
31
+ </ li >
32
+ {% endfor %}
33
+ </ ul >
36
34
</ div >
35
+ </ div >
37
36
38
- < br />
39
- {% if query_count_of_1_month.labels and query_count_of_1_month.int_data %}
40
- < h2 > {% trans "Overview of the past 1 month:" %}</ h2 >
41
- < canvas id ="analytics-chart-last-7-days " width ="400 " height ="150 "> </ canvas >
42
- {% endif %}
43
-
44
- < br />
45
- < form method ="get ">
46
- < button type ="submit " name ="download " value ="true "> {% trans "Download all data" %}</ button >
47
- </ form >
48
- {% else %}
49
- < p class ="empty ">
50
- {% blocktrans trimmed %}
51
- Hey there! This feature is currently in beta state and is available under a
52
- < a href ='https://docs.readthedocs.io/page/guides/feature-flags.html#available-flags '> feature flag</ a > .
53
- In case you want to test this feature and help giving us feedback,
54
- please contact us via
55
- < a href ='https://github.com/readthedocs/readthedocs.org/issues/new?title=Request%20to%20enable%20SEARCH_ANALYTICS%20feature%20flag%20for%20project%20{{ project }} '> GitHub issues</ a > .
56
- {% endblocktrans %}
57
- </ p >
37
+ < br />
38
+ {% if query_count_of_1_month.labels and query_count_of_1_month.int_data %}
39
+ < h2 > {% trans "Overview of the past 1 month:" %}</ h2 >
40
+ < canvas id ="analytics-chart-last-7-days " width ="400 " height ="150 "> </ canvas >
58
41
{% endif %}
42
+
43
+ < br />
44
+ < form method ="get ">
45
+ < button type ="submit " name ="download " value ="true "> {% trans "Download all data" %}</ button >
46
+ </ form >
47
+
59
48
{% endblock %}
60
49
61
50
{% block extra_scripts %}
@@ -70,7 +59,7 @@ <h2>{% trans "Overview of the past 1 month:" %}</h2>
70
59
71
60
{% block footerjs %}
72
61
73
- {% if query_count_of_1_month.labels and query_count_of_1_month.int_data and show_analytics %}
62
+ {% if query_count_of_1_month.labels and query_count_of_1_month.int_data %}
74
63
// Line chart
75
64
var line_chart = document.getElementById("analytics-chart-last-7-days").getContext("2d");
76
65
var line_chart_labels = {{ query_count_of_1_month.labels|safe }};
0 commit comments