Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds route ID to the Explore sidebar #3349

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/explore.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ <h1 class="status-holder-header-1">@Messages("audit.right.ui.current.neighborhoo
</div>
</div>
<div id="mission-completion-status-box" class="status-box">
<h1>@Messages("audit.right.ui.current.mission")</h1>
<h2 id="current-mission-description">Let's make this neighborhood accessible</h2>
<h1 id="current-mission-header"></h1>
<h2 id="current-mission-description"></h2>
<div id='status-current-mission-completion-bar'>
<div id='status-current-mission-completion-bar-filler'>
<div id='status-current-mission-completion-rate'></div>
Expand Down
1 change: 0 additions & 1 deletion conf/messages.de
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ audit.left.ui.jump.explore.button.new.neighborhood = In ein neues Quartier wechs
audit.right.ui.overall.stats = Gesamtübersicht
audit.right.ui.current.neighborhood = Aktuelles Quartier
audit.right.ui.distance = Kilometer
audit.right.ui.current.mission = Aktuelle Mission

audit.center.ui.passable = Passierbar
audit.center.ui.not.passable = Nicht passierbar
Expand Down
1 change: 0 additions & 1 deletion conf/messages.en
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ audit.left.ui.jump.explore.button.new.neighborhood = Go to a new neighborhood
audit.right.ui.overall.stats = Overall Stats
audit.right.ui.current.neighborhood = Current Neighborhood
audit.right.ui.distance = kilometers
audit.right.ui.current.mission = Current Mission

audit.center.ui.passable = Passable
audit.center.ui.not.passable = Not Passable
Expand Down
1 change: 0 additions & 1 deletion conf/messages.es
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ audit.left.ui.jump.explore.button.new.neighborhood = Ir a un nuevo barrio
audit.right.ui.overall.stats = Estadísticas generales
audit.right.ui.current.neighborhood = Colonia actual
audit.right.ui.distance = kilómetros
audit.right.ui.current.mission = Misión actual

audit.center.ui.passable = Transitable
audit.center.ui.not.passable = No es transitable
Expand Down
1 change: 0 additions & 1 deletion conf/messages.nl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ audit.left.ui.jump.explore.button.new.neighborhood = Ga naar een nieuwe wijk
audit.right.ui.overall.stats = Algemene statistieken
audit.right.ui.current.neighborhood = Huidige Wijk
audit.right.ui.distance = kilometer
audit.right.ui.current.mission = Huidige Missie

audit.center.ui.passable = Begaanbaar
audit.center.ui.not.passable = Niet Begaanbaar
Expand Down
1 change: 0 additions & 1 deletion conf/messages.zh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ audit.left.ui.jump.explore.button.new.neighborhood = 前往新的鄰里
audit.right.ui.overall.stats = 整體統計數據
audit.right.ui.current.neighborhood = 目前所在鄰里
audit.right.ui.distance = 公里
audit.right.ui.current.mission = 目前任務

audit.center.ui.passable = 可通過的
audit.center.ui.not.passable = 不可通過的
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/SVLabel/css/svl-status.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

.status-box h1 {
font-size: 12pt;
font-size: 11pt;
margin: 0 0 4px 0;
}

Expand Down
1 change: 1 addition & 0 deletions public/javascripts/SVLabel/src/SVLabel/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ function Main (params) {
svl.ui.status.neighborhoodName = $("#status-holder-neighborhood-name");
svl.ui.status.neighborhoodLink = $("#status-neighborhood-link");
svl.ui.status.neighborhoodLabelCount = $("#status-neighborhood-label-count");
svl.ui.status.currentMissionHeader = $("#current-mission-header");
svl.ui.status.currentMissionDescription = $("#current-mission-description");
svl.ui.status.currentMissionReward = $("#current-mission-reward");
svl.ui.status.totalMissionReward = $("#total-mission-reward");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function StatusFieldMission (modalModel, uiStatusField) {
var self = this;
var $missionHeader = uiStatusField.holder.find("#current-mission-header");
var $missionDescription = uiStatusField.holder.find("#current-mission-description");

modalModel.on("ModalMissionComplete:closed", function (param) {
Expand All @@ -11,6 +12,13 @@ function StatusFieldMission (modalModel, uiStatusField) {
* @param mission
*/
this.setMessage = function (mission) {
// Set header first. We just add "Route: <route-number>" if we are on a user-defined route.
if (svl.neighborhoodModel.isRoute) {
$missionHeader.html(i18next.t('right-ui.current-mission.header-route', { route_number: svl.routeId }));
} else {
$missionHeader.html(i18next.t('right-ui.current-mission.header'));
}

var missionType = mission.getProperty("missionType");

var missionMessage;
Expand Down
2 changes: 2 additions & 0 deletions public/locales/de/audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"accuracy-tooltip": "Die Bewertung Ihrer Genauigkeit basiert auf der Validierung durch andere Nutzende. Wenn Ihre Genauigkeit tief ist, sehen Sie sich häufige Fehler unter <a href=\"/dashboard\" target=\"_blank\" id=\"tooltip-dashboard-link\">Ihrem Dashboard</a> an, um sich zu verbessern!",
"no-accuracy-tooltip": "Wir benötigen mehr Daten, um Ihre Genauigkeit zu bewerten. Fügen Sie mehr Beschriftungen hinzu und melden Sie sich an, um die Bewertung Ihrer Genauigkeit zu verfolgen!",
"current-mission": {
"header": "Aktuelle Mission",
"header-route": "$t(right-ui.current-mission.header): Route {{route_number}}",
"message-first-mission": "Erkunden Sie __PLACEHOLDER__ und finden Sie alle Zugänglichkeitsmerkmale entlang des Gehwegs",
"message": "Erkunden Sie __PLACEHOLDER__ von diesem Quartier"
},
Expand Down
2 changes: 2 additions & 0 deletions public/locales/en/audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"accuracy-tooltip": "Accuracy is based on validations from other users. If your accuracy is low, check out some recent mistakes on <a href=\"/dashboard\" target=\"_blank\" id=\"tooltip-dashboard-link\">your User Dashboard</a> to help you improve!",
"no-accuracy-tooltip": "We need more data to calculate an accuracy rating for you. Add more labels and sign up to keep track of your accuracy rating!",
"current-mission": {
"header": "Current Mission",
"header-route": "$t(right-ui.current-mission.header): Route {{route_number}}",
"message-first-mission": "Explore for __PLACEHOLDER__ and find all the sidewalk accessibility attributes",
"message": "Explore __PLACEHOLDER__ of this neighborhood"
},
Expand Down
2 changes: 2 additions & 0 deletions public/locales/es/audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"accuracy-tooltip": "La precisión se basa en validaciones de otros usuarios. Si su precisión es baja, consulte algunos errores recientes en <a href=\"/dashboard\" target=\"_blank\" id=\"tooltip-dashboard-link\">su panel de usuario</a> para ayudarlo a mejorar.",
"no-accuracy-tooltip": "Necesitamos más datos para calcular una calificación de precisión para usted. ¡Agregue más etiquetas y regístrese para realizar un seguimiento de su calificación de precisión!",
"current-mission": {
"header": "Misión actual",
"header-route": "$t(right-ui.current-mission.header): Ruta {{route_number}}",
"message-first-mission": "Explora __PLACEHOLDER__ y encuentra todos los atributos de accesibilidad de la banqueta",
"message": "Explora __PLACEHOLDER__ de este barrio"
},
Expand Down
2 changes: 2 additions & 0 deletions public/locales/nl/audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"accuracy-tooltip": "Nauwkeurigheid is gebaseerd op validaties van andere gebruikers. Als uw nauwkeurigheid laag is, bekijk dan enkele recente fouten op <a href=\"/dashboard\" target=\"_blank\" id=\"tooltip-dashboard-link\">uw gebruikersdashboard</a> om u te helpen verbeteren!",
"no-accuracy-tooltip": "We hebben meer gegevens nodig om een nauwkeurigheidsbeoordeling voor u te berekenen. Voeg meer labels toe en meld u aan om uw nauwkeurigheidsbeoordeling bij te houden!",
"current-mission": {
"header": "Huidige Missie",
"header-route": "$t(right-ui.current-mission.header): Route {{route_number}}",
"message-first-mission": "Zoek voor __PLACEHOLDER__ en vind alle trottoir toegankelijkheidskenmerken",
"message": "Zoek __PLACEHOLDER__ voor deze wijk"
},
Expand Down
2 changes: 2 additions & 0 deletions public/locales/zh/audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"accuracy-tooltip": "精準度是依照其他用戶的檢核。若您的精準度很低,請查看近期檢核出的錯誤於 <a href=\"/dashboard\" target=\"_blank\" id=\"tooltip-dashboard-link\">您的用戶儀表板</a> 以協助您增加精準度!",
"no-accuracy-tooltip": "我們需要更多的資料以計算您的精準度。請新增更多的標記並註冊帳號以持續追蹤進度及精準度!",
"current-mission": {
"header": "目前任務",
"header-route": "$t(right-ui.current-mission.header): 路線{{route_number}}",
"message-first-mission": "探索__PLACEHOLDER__並找到所有人行道無障礙選項",
"message": "探索__PLACEHOLDER__ "
},
Expand Down