|
5 | 5 | <div class="container"> |
6 | 6 | <h1>{dgettext("espace-producteurs", "Producer space")}</h1> |
7 | 7 |
|
8 | | - {render("_urgent_issues.html", datasets: @datasets, checks: @checks, conn: @conn, mode: :producer)} |
9 | | - |
10 | | - <h2>{dgettext("espace-producteurs", "Actions")}</h2> |
11 | | - <div class="row"> |
| 8 | + <h2>{dgettext("espace-producteurs", "Available services")}</h2> |
| 9 | + <div class="row pb-48"> |
12 | 10 | <div class="panel action-panel"> |
13 | | - <div class="publish-header"> |
14 | | - <h4> |
15 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-check.svg")} alt="" /> |
16 | | - {dgettext("espace-producteurs", "Validate your datasets")} |
17 | | - </h4> |
18 | | - </div> |
19 | | - <div class="action-text"> |
20 | | - {dgettext( |
21 | | - "espace-producteurs", |
22 | | - "Before publishing, you can test your data online and check its validity." |
23 | | - )} |
24 | | - </div> |
25 | | - <div class="action-button"> |
| 11 | + <h4> |
| 12 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-check.svg")} alt="" /> |
| 13 | + {dgettext("espace-producteurs", "Validate your datasets")} |
| 14 | + </h4> |
| 15 | + <div class="action-panel-content"> |
| 16 | + <div class="action-text"> |
| 17 | + {dgettext( |
| 18 | + "espace-producteurs", |
| 19 | + "Before publishing, you can test your data online and check its validity." |
| 20 | + )} |
| 21 | + </div> |
26 | 22 | <a href={live_path(@conn, TransportWeb.Live.OnDemandValidationSelectLive)} class="button primary"> |
27 | 23 | {dgettext("espace-producteurs", "Validate a file or a feed")} |
28 | 24 | </a> |
29 | 25 | </div> |
30 | 26 | </div> |
31 | 27 | <div class="panel action-panel"> |
32 | | - <div class="publish-header"> |
33 | | - <h4> |
34 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-publier.svg")} alt="" /> |
35 | | - {dgettext("espace-producteurs", "Publish a dataset")} |
36 | | - </h4> |
37 | | - </div> |
38 | | - <div class="action-text"> |
39 | | - {dgettext( |
40 | | - "espace-producteurs", |
41 | | - "Before we can reference your mobility data on the National Access Point, you need to upload it on data.gouv.fr by publishing a new dataset." |
42 | | - )}<a href="https://doc.transport.data.gouv.fr/administration-des-donnees"><%= dgettext("espace-producteurs", "Adding a dataset guidelines") %></a> |
43 | | - </div> |
44 | | - <div class="action-button"> |
| 28 | + <h4> |
| 29 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-publier.svg")} alt="" /> |
| 30 | + {dgettext("espace-producteurs", "Publish a dataset")} |
| 31 | + </h4> |
| 32 | + <div class="action-panel-content"> |
| 33 | + <div class="action-text"> |
| 34 | + {dgettext( |
| 35 | + "espace-producteurs", |
| 36 | + "Before we can reference your mobility data on the National Access Point, you need to upload it on data.gouv.fr by publishing a new dataset." |
| 37 | + )}<a href="https://doc.transport.data.gouv.fr/administration-des-donnees"><%= dgettext("espace-producteurs", "Adding a dataset guidelines") %></a> |
| 38 | + </div> |
45 | 39 | <a href={dataset_creation_url()} class="button primary"> |
46 | 40 | {dgettext("espace-producteurs", "Publish a new dataset")} |
47 | 41 | </a> |
48 | 42 | </div> |
49 | 43 | </div> |
50 | 44 | <div class="panel action-panel"> |
51 | | - <div class="publish-header"> |
52 | | - <h4> |
53 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-bell.svg")} alt="" /> |
54 | | - {dgettext("espace-producteurs", "Receive notifications")} |
55 | | - </h4> |
56 | | - </div> |
57 | | - <div class="action-text"> |
58 | | - {dgettext( |
59 | | - "espace-producteurs", |
60 | | - "Receive helpful notifications about the data you publish." |
61 | | - )} |
62 | | - </div> |
63 | | - <div class="action-button"> |
| 45 | + <h4> |
| 46 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-bell.svg")} alt="" /> |
| 47 | + {dgettext("espace-producteurs", "Receive notifications")} |
| 48 | + </h4> |
| 49 | + <div class="action-panel-content"> |
| 50 | + <div class="action-text"> |
| 51 | + {dgettext( |
| 52 | + "espace-producteurs", |
| 53 | + "Receive helpful notifications about the data you publish." |
| 54 | + )} |
| 55 | + </div> |
64 | 56 | <a href={espace_producteur_path(@conn, :notifications)} class="button primary"> |
65 | 57 | {dgettext("espace-producteurs", "Manage notifications")} |
66 | 58 | </a> |
67 | 59 | </div> |
68 | 60 | </div> |
69 | 61 | <div :if={show_proxy_stats_block?(@datasets)} class="panel action-panel"> |
70 | | - <div class="publish-header"> |
71 | | - <h4> |
72 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-trend.svg")} alt="" /> |
73 | | - {dgettext("espace-producteurs", "Your proxy statistics")} |
74 | | - </h4> |
75 | | - </div> |
76 | | - <div class="action-text"> |
77 | | - {dgettext( |
78 | | - "espace-producteurs", |
79 | | - "Get access to traffic statistics for your feeds handled by the transport.data.gouv.fr proxy." |
80 | | - )} |
81 | | - </div> |
82 | | - <div class="action-button"> |
| 62 | + <h4> |
| 63 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-trend.svg")} alt="" /> |
| 64 | + {dgettext("espace-producteurs", "Your proxy statistics")} |
| 65 | + </h4> |
| 66 | + <div class="action-panel-content"> |
| 67 | + <div class="action-text"> |
| 68 | + {dgettext( |
| 69 | + "espace-producteurs", |
| 70 | + "Get access to traffic statistics for your feeds handled by the transport.data.gouv.fr proxy." |
| 71 | + )} |
| 72 | + </div> |
83 | 73 | <a href={espace_producteur_path(@conn, :proxy_statistics)} class="button primary"> |
84 | 74 | {dgettext("espace-producteurs", "See statistics")} |
85 | 75 | </a> |
86 | 76 | </div> |
87 | 77 | </div> |
88 | 78 | <div :if={show_downloads_stats?(@datasets)} class="panel action-panel"> |
89 | | - <div class="publish-header"> |
90 | | - <h4> |
91 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-trend.svg")} alt="" /> |
92 | | - {dgettext("espace-producteurs", "Your download statistics")} |
93 | | - </h4> |
94 | | - </div> |
95 | | - <div class="action-text"> |
96 | | - {dgettext( |
97 | | - "espace-producteurs", |
98 | | - "Get access to download statistics for your resources." |
99 | | - )} |
100 | | - </div> |
101 | | - <div class="action-button"> |
| 79 | + <h4> |
| 80 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-trend.svg")} alt="" /> |
| 81 | + {dgettext("espace-producteurs", "Your download statistics")} |
| 82 | + </h4> |
| 83 | + <div class="action-panel-content"> |
| 84 | + <div class="action-text"> |
| 85 | + {dgettext( |
| 86 | + "espace-producteurs", |
| 87 | + "Get access to download statistics for your resources." |
| 88 | + )} |
| 89 | + </div> |
102 | 90 | <a href={espace_producteur_path(@conn, :download_statistics)} class="button primary"> |
103 | 91 | {dgettext("espace-producteurs", "See statistics")} |
104 | 92 | </a> |
105 | 93 | </div> |
106 | 94 | </div> |
107 | 95 | <div class="panel action-panel"> |
108 | | - <div class="publish-header"> |
109 | | - <h4> |
110 | | - <img class="picto" src={static_path(@conn, "/images/producteurs/picto-discussions.svg")} alt="" /> |
111 | | - {dgettext("espace-producteurs", "Unanswered discussions")} |
112 | | - </h4> |
113 | | - </div> |
114 | | - <div class="action-text"> |
115 | | - {dgettext( |
116 | | - "espace-producteurs", |
117 | | - "See unanswered discussions on your datasets." |
118 | | - )} |
119 | | - </div> |
120 | | - <div class="action-button"> |
| 96 | + <h4> |
| 97 | + <img class="picto" src={static_path(@conn, "/images/producteurs/picto-discussions.svg")} alt="" /> |
| 98 | + {dgettext("espace-producteurs", "Unanswered discussions")} |
| 99 | + </h4> |
| 100 | + <div class="action-panel-content"> |
| 101 | + <div class="action-text"> |
| 102 | + {dgettext( |
| 103 | + "espace-producteurs", |
| 104 | + "See unanswered discussions on your datasets." |
| 105 | + )} |
| 106 | + </div> |
121 | 107 | <a href={espace_producteur_path(@conn, :discussions)} class="button primary"> |
122 | 108 | {dgettext("espace-producteurs", "See unanswered discussions")} |
123 | 109 | </a> |
124 | 110 | </div> |
125 | 111 | </div> |
126 | 112 | </div> |
127 | 113 |
|
| 114 | + {render("_important_information.html", datasets: @datasets, checks: @checks, conn: @conn, mode: :producer)} |
| 115 | + |
128 | 116 | <h2 class="pt-48">{dgettext("espace-producteurs", "Datasets of your organisation")}</h2> |
129 | 117 | {live_render(@conn, TransportWeb.Live.UserSpaceDatasetsLive, |
130 | 118 | session: %{"dataset_ids" => Enum.map(@datasets, & &1.id), "mode" => :producer} |
|
168 | 156 | session: %{"feature" => "producer_space"} |
169 | 157 | )} |
170 | 158 | </section> |
| 159 | +<script nonce={get_session(@conn, :csp_nonce_value)}> |
| 160 | + document.querySelectorAll('.action-panel h4').forEach(header => { |
| 161 | + header.addEventListener('click', () => { |
| 162 | + const allContents = document.querySelectorAll('.action-panel-content'); |
| 163 | + allContents.forEach(content => { |
| 164 | + content.classList.toggle('hide'); |
| 165 | + }); |
| 166 | + }); |
| 167 | + }); |
| 168 | +</script> |
0 commit comments