@@ -34,8 +34,7 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
3434 < td >
3535 < a class ="view-field "
3636 href ="https://www.wikidata.org/wiki/{{ instrument.wikidata_id }} "
37- target ="_blank "> {{
38- instrument.wikidata_id }}</ a >
37+ target ="_blank "> {{ instrument.wikidata_id }}</ a >
3938 </ td >
4039 </ tr >
4140 < tr >
@@ -67,12 +66,6 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
6766 < th scope ="col " class ="w-20 ">
6867 < span > Name</ span >
6968 </ th >
70- < th scope ="col " class ="w-20 ">
71- < span > Alias</ span >
72- </ th >
73- < th scope ="col " class ="w-20 ">
74- < span > Source</ span >
75- </ th >
7669 {% if user.is_authenticated %}
7770 < th scope ="col " class ="w-25 ">
7871 < span > Verification Status</ span >
@@ -84,6 +77,15 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
8477 </ i >
8578 </ th >
8679 {% endif %}
80+ {% if user.is_authenticated %}
81+ < th scope ="col " class ="w-30 ">
82+ < span > Alias</ span >
83+ </ th >
84+ {% else %}
85+ < th scope ="col " class ="w-20 ">
86+ < span > Alias</ span >
87+ </ th >
88+ {% endif %}
8789 {% if user.is_authenticated %}
8890 < th scope ="col ">
8991 < span class ="name-form-item "> Actions</ span >
@@ -105,13 +107,6 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
105107 < span class ="view-field flex-grow-1 notranslate "> {{ names.label.name }}</ span >
106108 </ div >
107109 </ td >
108- < td > </ td >
109- <!-- Alias blank -->
110- < td >
111- < div class ="d-flex flex-row justify-content-between align-items-center gap-2 edit-container ">
112- < span class ="view-field flex-grow-1 "> {{ names.label.source_name }}</ span >
113- </ div >
114- </ td >
115110 {% if user.is_authenticated %}
116111 < td >
117112 < div class ="d-flex flex-row justify-content-between align-items-center gap-2 edit-container ">
@@ -127,6 +122,44 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
127122 </ div >
128123 </ td >
129124 {% endif %}
125+ < td >
126+ < div class ="d-flex flex-column gap-2 ">
127+ {% for alias in names.aliases %}
128+ < div class ="p-2 rounded bg-light border d-flex justify-content-between align-items-center ">
129+ < div class ="d-flex flex-column flex-grow-1 ">
130+ < span class ="notranslate "> {{ alias.name }}</ span >
131+ {% if user.is_authenticated %}
132+ < div >
133+ {% if alias.verification_status == 'verified' %}
134+ < span class ="badge rounded-pill bg-success "> Verified</ span >
135+ {% elif alias.verification_status == 'unverified' %}
136+ < span class ="badge rounded-pill bg-secondary "> Unverified</ span >
137+ {% elif alias.verification_status == 'rejected' %}
138+ < span class ="badge rounded-pill bg-danger "> Rejected</ span >
139+ {% else %}
140+ < span class ="badge rounded-pill bg-warning text-dark "> Under Review</ span >
141+ {% endif %}
142+ </ div >
143+ {% endif %}
144+ </ div >
145+ {% if user.is_authenticated %}
146+ < div class ="action-buttons ms-2 ">
147+ < button class ="btn btn-primary btn-sm "
148+ data-bs-toggle ="modal "
149+ data-bs-target ="#deleteNameModal "
150+ data-instrument-language ="{{ alias.label.language.en_label }} "
151+ data-instrument-name ="{{ alias.label.name }} "
152+ data-instrument-source ="{{ alias.label.source_name }} "
153+ data-instrument-id ="{{ alias.label.id }} "
154+ data-instrument-pk ="{{ instrument.pk }} ">
155+ Delete
156+ </ button >
157+ </ div >
158+ {% endif %}
159+ </ div >
160+ {% endfor %}
161+ </ div >
162+ </ td >
130163 {% if user.is_authenticated %}
131164 < td >
132165 < div class ="action-buttons ">
@@ -144,58 +177,6 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
144177 </ td >
145178 {% endif %}
146179 </ tr >
147- <!-- Rows for aliases -->
148- {% if names.aliases %}
149- {% for alias in names.aliases %}
150- < tr class ="{% if forloop.parentloop.counter > 5 %}d-none extra-language-row{% endif %} ">
151- < td > </ td >
152- <!-- Language blank -->
153- < td > </ td >
154- <!-- Name blank -->
155- < td >
156- < div class ="d-flex flex-row justify-content-between align-items-center gap-2 edit-container ">
157- < span class ="view-field flex-grow-1 notranslate "> {{ alias.name }}</ span >
158- </ div >
159- </ td >
160- < td >
161- < div class ="d-flex flex-row justify-content-between align-items-center gap-2 edit-container ">
162- < span class ="view-field flex-grow-1 notranslate "> {{ alias.source_name }}</ span >
163- </ div >
164- </ td >
165- {% if user.is_authenticated %}
166- < td >
167- < div class ="d-flex flex-row justify-content-between align-items-center gap-2 edit-container ">
168- {% if alias.verification_status == 'verified' %}
169- < span class ="badge rounded-pill text-bg-success "> Verified</ span >
170- {% elif alias.verification_status == 'unverified' %}
171- < span class ="badge rounded-pill text-bg-gray "> Unverified</ span >
172- {% elif alias.verification_status == 'rejected' %}
173- < span class ="badge rounded-pill text-bg-danger "> Rejected</ span >
174- {% else %}
175- < span class ="badge rounded-pill text-bg-warning "> Under Review</ span >
176- {% endif %}
177- </ div >
178- </ td >
179- {% endif %}
180- {% if user.is_authenticated %}
181- < td >
182- < div class ="action-buttons ">
183- < button class ="btn btn-primary "
184- data-bs-toggle ="modal "
185- data-bs-target ="#deleteNameModal "
186- data-instrument-language ="{{ alias.language.en_label }} "
187- data-instrument-name ="{{ alias.name }} "
188- data-instrument-source ="{{ alias.source_name }} "
189- data-instrument-id ="{{ alias.id }} "
190- data-instrument-pk ="{{ instrument.pk }} ">
191- Delete
192- </ button >
193- </ div >
194- </ td >
195- {% endif %}
196- </ tr >
197- {% endfor %}
198- {% endif %}
199180 {% endfor %}
200181 </ tbody >
201182 </ table >
@@ -214,24 +195,9 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
214195 < div class ="fw-bold text-muted small "> Name</ div >
215196 < span class ="view-field notranslate "> {{ names.label.name }}</ span >
216197 </ div >
217- <!-- Aliases -->
218- < div class ="mb-1 ">
219- < div class ="fw-bold text-muted small "> Alias</ div >
220- < div class ="alias-list ">
221- {% for alias in names.aliases %}
222- < span class ="alias-item "> {{ alias.name }}</ span >
223- < br />
224- {% endfor %}
225- </ div >
226- </ div >
227- <!-- Source -->
228- < div class ="mb-1 ">
229- < div class ="fw-bold text-muted small "> Source</ div >
230- < span class ="view-field "> {{ names.label.source_name }}</ span >
231- </ div >
232198 {% if user.is_authenticated %}
233199 <!-- Status column -->
234- < div class ="col-12 ">
200+ < div class ="col-12 mb-1 ">
235201 < div class ="fw-bold text-muted small mb-1 ">
236202 Verification Status
237203 < i class ="bi bi-info-circle "
@@ -254,8 +220,53 @@ <h2 class="notranslate">{{ active_instrument_label.name|title }}</h2>
254220 </ div >
255221 </ div >
256222 {% endif %}
223+ <!-- Aliases -->
224+ < div class ="mb-1 ">
225+ {% if names.aliases %}
226+ < div class ="fw-bold text-muted small "> Alias</ div >
227+ < div class ="alias-list ">
228+ < div class ="d-flex flex-column gap-2 ">
229+ {% for alias in names.aliases %}
230+ < div class ="p-2 rounded bg-light border d-flex justify-content-between align-items-center ">
231+ < div class ="d-flex flex-column flex-grow-1 ">
232+ < span class ="notranslate "> {{ alias.name }}</ span >
233+ {% if user.is_authenticated %}
234+ < div >
235+ {% if alias.verification_status == 'verified' %}
236+ < span class ="badge rounded-pill bg-success "> Verified</ span >
237+ {% elif alias.verification_status == 'unverified' %}
238+ < span class ="badge rounded-pill bg-secondary "> Unverified</ span >
239+ {% elif alias.verification_status == 'rejected' %}
240+ < span class ="badge rounded-pill bg-danger "> Rejected</ span >
241+ {% else %}
242+ < span class ="badge rounded-pill bg-warning text-dark "> Under Review</ span >
243+ {% endif %}
244+ </ div >
245+ {% endif %}
246+ </ div >
247+ {% if user.is_authenticated %}
248+ < div class ="action-buttons ms-2 ">
249+ < button class ="btn btn-primary btn-sm "
250+ data-bs-toggle ="modal "
251+ data-bs-target ="#deleteNameModal "
252+ data-instrument-language ="{{ alias.label.language.en_label }} "
253+ data-instrument-name ="{{ alias.label.name }} "
254+ data-instrument-source ="{{ alias.label.source_name }} "
255+ data-instrument-id ="{{ alias.label.id }} "
256+ data-instrument-pk ="{{ instrument.pk }} ">
257+ Delete
258+ </ button >
259+ </ div >
260+ {% endif %}
261+ </ div >
262+ {% endfor %}
263+ </ div >
264+ </ div >
265+ {% endif %}
266+ </ div >
267+ <!-- Action -->
257268 {% if user.is_authenticated %}
258- < div class ="action-buttons mt-1 ">
269+ < div class ="action-buttons my-2 ">
259270 < button class ="btn btn-primary "
260271 data-bs-toggle ="modal "
261272 data-bs-target ="#deleteNameModal "
0 commit comments