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

v6.8.5 #2162

Merged
merged 109 commits into from
Jul 3, 2020
Merged

v6.8.5 #2162

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
2aa2a34
Internationalize Current Neighborhood Distance
MattJ12 May 6, 2020
e5c2142
Translate Distances on Mission Complete Modal
MattJ12 May 7, 2020
5e8ddfb
Translate Audit Sidebar Mission Distance
MattJ12 May 8, 2020
768e3bc
Translates Mission Start Modal Distances
MattJ12 May 8, 2020
8f26710
Updates distance translation JSON files
MattJ12 May 11, 2020
30f444c
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 May 11, 2020
e24709d
Translates landing page audited distance and choropleths
MattJ12 May 25, 2020
8798b50
Translates Date in Footer and Mini-footer
MattJ12 May 29, 2020
613cab3
Method Comment Style Update
MattJ12 May 29, 2020
48529d2
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 May 29, 2020
7f9c181
Translates the dates on the label pop up for the AdminGSVLabelView
MattJ12 May 29, 2020
7649db7
Minor fixes for Choropleths
MattJ12 May 30, 2020
14dba3e
Translates total distance audited by user on their dashboard
MattJ12 Jun 1, 2020
3a36621
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jun 1, 2020
baa02a1
Updates date formatting on user dashboard
MattJ12 Jun 1, 2020
5bfa3fa
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jun 3, 2020
f0f3a2e
Revert "Merge branch 'develop' into 2051-Internationalize-distances-d…
MattJ12 Jun 3, 2020
faa5518
Audit Page Updates
MattJ12 Jun 4, 2020
c73b8b3
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jun 4, 2020
076d12d
Updates Work Making a Difference Translation
MattJ12 Jun 4, 2020
79e7719
Translate Correct Distance for Landing Page Animation
MattJ12 Jun 5, 2020
97502a7
Change to Compact Date Format
MattJ12 Jun 5, 2020
b74e1b0
User dashboard graph x-axis date translation
MattJ12 Jun 6, 2020
d34a939
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Jun 8, 2020
e899429
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jun 10, 2020
fdb1526
Fixes distances not converting for user dashboard choropleth
MattJ12 Jun 10, 2020
7b895e8
Adds space inbetween mission distance and unit type
MattJ12 Jun 10, 2020
d9a084e
Merge branch '2051-Internationalize-distances-dates-times' of https:/…
MattJ12 Jun 10, 2020
14ae04b
Translates date on GSV pano for audit
MattJ12 Jun 10, 2020
36991c8
Fixes Date Format for user dashboard
MattJ12 Jun 10, 2020
3193ffc
fixes admin choropleth being multiplied by 100
MattJ12 Jun 13, 2020
bf27fd0
Correctly indentifies an invalid date and fixes Moment.js errors for …
MattJ12 Jun 13, 2020
1c867c6
Makes horizontal units on user dashboard graph less ambiguous
MattJ12 Jun 13, 2020
f9dd3de
Updates total distance audited conversion on landing page
MattJ12 Jun 13, 2020
7182e7e
show more detail in city coverage graph
jstadeusiak Jun 15, 2020
475cfd5
correct landing page distances audited
MattJ12 Jun 15, 2020
d8343dd
Converts distances on admin page
MattJ12 Jun 15, 2020
86a0c91
Updates Messages translation files for admin dashboard
MattJ12 Jun 15, 2020
c5638ee
Merge pull request #2137 from ProjectSidewalk/2062-show-more-detail-i…
misaugstad Jun 19, 2020
20aa2fe
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Jun 19, 2020
4737589
Fixes incorrect translation key
MattJ12 Jun 19, 2020
325adf6
Merge branch '2051-Internationalize-distances-dates-times' of https:/…
MattJ12 Jun 19, 2020
3dbf3bc
Takes away day for image date on label map pop-up
MattJ12 Jun 19, 2020
96f0589
Abbreviates months on user dashboard chart
MattJ12 Jun 19, 2020
02c1f75
Abbreviates month format for image time stamp on GSV Pano
MattJ12 Jun 19, 2020
c3ed283
Updates 'your work is making a difference' portion on landing page to…
MattJ12 Jun 19, 2020
7e03817
Gets correct date for bottom left of GSV Panorama on audit interface
MattJ12 Jun 22, 2020
4a6999e
Adds 'dashboard' and 'validate' namespaces to en-US locale
MattJ12 Jun 22, 2020
4794f19
Style fixes
MattJ12 Jun 22, 2020
b988420
Various style fixes
MattJ12 Jun 22, 2020
2deb4c3
Revert "Revert "Merge branch 'develop' into 2051-Internationalize-dis…
MattJ12 Jun 23, 2020
b217974
Fixed a typo and the "filetype" parameter description on the API page.
shokiami Jun 23, 2020
376c531
Merge pull request #2141 from ProjectSidewalk/2084-API-optional-param…
misaugstad Jun 23, 2020
462b93e
Updates distance conversion for all four choropleths to convert from …
MattJ12 Jun 23, 2020
ae0970c
Updates conversion from miles to kilometers on landing page to be mor…
MattJ12 Jun 23, 2020
626e362
Minor style fixes. Puts spaces around the '<' character and removes …
MattJ12 Jun 23, 2020
1fd6d1a
Removes 'measurement-system' namespaces key from 'audit' namespace
MattJ12 Jun 23, 2020
6c018f7
Updates common namespace key 'map.distance-left-one-unit' to automati…
MattJ12 Jun 23, 2020
634f4e8
Adjusts for namespace 'audit' no longer having a key for the measurem…
MattJ12 Jun 23, 2020
4aab572
Creates key 'unit-abbreviation' in common namespace and uses it for t…
MattJ12 Jun 23, 2020
f882bb4
Changes mission modals to only have pre-set missions up to 1000 ft. …
MattJ12 Jun 23, 2020
b7abc4e
Adds updateTimestamp function when the timestamp needs to be updated …
MattJ12 Jun 23, 2020
9044bed
Changed checkbox text to "Temporary (e.g., construction)"
jonfroehlich Jun 24, 2020
4dc69fd
Merge pull request #2146 from ProjectSidewalk/2145-remove-trash-text-…
misaugstad Jun 24, 2020
239ae47
Makes key for common namespace used in Progress.js to display unit ty…
MattJ12 Jun 24, 2020
23ce724
Moves some language processing from ModalMissionComplete.js to just c…
MattJ12 Jun 24, 2020
190e831
Fixes statistics bleeding over on the front page for Safari.
shokiami Jun 24, 2020
204496b
Updates key in common namespace to be 'unit-distance' instead of bein…
MattJ12 Jun 24, 2020
618581f
Updates comment in Progress.js to correctly reflect calculating total…
MattJ12 Jun 24, 2020
7c53e87
Makes main.js do less work based on the locale, gives more work to co…
MattJ12 Jun 24, 2020
d79d24f
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jun 24, 2020
261af53
Updates spacing in labelMap.scala.html and Main.js
MattJ12 Jun 25, 2020
eed4580
Fixed <#2115>: Fixed image popup location in validation
rpechuk Jun 25, 2020
36b03dc
Updates polygon neighborhood border on label map to be thicker and re…
MattJ12 Jun 27, 2020
2255b63
Updates polygon neighborhood border on user dashboard map to be thick…
MattJ12 Jun 27, 2020
726b92b
Updates map on user dashboard to have darker borders around neghborho…
MattJ12 Jun 29, 2020
262b2fa
Updates label map to have darker borders around neghborhoods and a sl…
MattJ12 Jun 29, 2020
c023ae2
#2140: added SPGG to front page
rpechuk Jun 29, 2020
88a174e
#2140: added SPGG to front page using nbsp and changed MX-NLE to MX
rpechuk Jun 29, 2020
b599e98
#2140: fixed city-id
rpechuk Jun 29, 2020
b577651
#2140: fixed city-id for real
rpechuk Jun 29, 2020
3e23702
#2140: fixed city-id for real
rpechuk Jun 29, 2020
b062edd
Merge pull request #2157 from ProjectSidewalk/2140-Landing-Page-Add-SPGG
misaugstad Jul 1, 2020
944fa9c
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Jul 1, 2020
cac6337
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Jul 1, 2020
bcb04d0
adds clearer neighborhood borders to admin choropleth
misaugstad Jul 1, 2020
894a301
Merge pull request #2156 from ProjectSidewalk/2085-maps-add-polygon-o…
misaugstad Jul 1, 2020
b0e9e0d
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jul 1, 2020
c762235
changes map locations to focus on one spgg neighborhood
misaugstad Jul 1, 2020
a1ba018
Merge pull request #2159 from ProjectSidewalk/2147-spgg-start-with-on…
misaugstad Jul 1, 2020
b6d0123
upgrades npm packages for dev env
misaugstad Jul 2, 2020
0137676
bump websocket-extensions from 0.1.3 to 0.1.4
misaugstad Jul 2, 2020
6f2b7fe
Merge pull request #2160 from ProjectSidewalk/2129-bump-websocket-ext…
misaugstad Jul 2, 2020
b1772ba
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Jul 2, 2020
1f54fd0
Merge pull request #2149 from ProjectSidewalk/727-frontpage-fix-stati…
misaugstad Jul 2, 2020
2b21fab
#2140: fixed comments to match style guide
rpechuk Jul 2, 2020
345a18e
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
rpechuk Jul 2, 2020
55f9b72
Merge branch '2115-Validate-Fix-Side-Image-Placement' of https://gith…
rpechuk Jul 2, 2020
07d6ea4
Merge pull request #2151 from ProjectSidewalk/2115-Validate-Fix-Side-…
misaugstad Jul 2, 2020
62da092
Adds variable type in ApplicationController.scala
MattJ12 Jul 2, 2020
a42d587
Update calls of updateTimestamp to be updateTimestamps
MattJ12 Jul 2, 2020
8ea7360
Adds else clause for clarity to ModalMission.js and fixes spelling er…
MattJ12 Jul 2, 2020
b4a5bf0
Style update for comment in ModalMissionComplete.js
MattJ12 Jul 2, 2020
20ff1d6
Adds else clause for clarity to StatusFieldMission.js and fixes spell…
MattJ12 Jul 2, 2020
2deb70b
Changes name of function from updateTimestamp to updateTimestamps and…
MattJ12 Jul 2, 2020
e0f649c
Merge branch 'develop' into 2051-Internationalize-distances-dates-times
MattJ12 Jul 2, 2020
5622c11
fixes comment
misaugstad Jul 3, 2020
4896fc5
Merge pull request #2119 from ProjectSidewalk/2051-Internationalize-d…
misaugstad Jul 3, 2020
821273a
6.8.4 -> 6.8.5
misaugstad Jul 3, 2020
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
8 changes: 7 additions & 1 deletion app/controllers/ApplicationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import controllers.headers.ProvidesHeader
import models.user._
import models.amt.{AMTAssignment, AMTAssignmentTable}
import models.daos.slick.DBTableDefinitions.{DBUser, UserTable}
import models.street.StreetEdgeTable
import play.api.Play
import play.api.Play.current
import play.api.i18n.Messages
import java.util.Calendar
import play.api.mvc._

Expand Down Expand Up @@ -132,7 +134,11 @@ class ApplicationController @Inject() (implicit val env: Environment[User, Sessi
val otherURL: String = Play.configuration.getString("city-params.landing-page-url." + otherCity).get
(otherName + ", " + otherState, otherURL)
}
Future.successful(Ok(views.html.index("Project Sidewalk", Some(user), cityName, stateAbbreviation, cityShortName, mapathonLink, cityStr, otherCityUrls)))
// Get total audited distance. If using metric system, convert from miles to kilometers.
val auditedDistance: Float =
if (Messages("measurement.system") == "metric") StreetEdgeTable.auditedStreetDistance(1) * 1.60934.toFloat
else StreetEdgeTable.auditedStreetDistance(1)
Future.successful(Ok(views.html.index("Project Sidewalk", Some(user), cityName, stateAbbreviation, cityShortName, mapathonLink, cityStr, otherCityUrls, auditedDistance)))
} else{
WebpageActivityTable.save(WebpageActivity(0, user.userId.toString, ipAddress, activityLogText, timestamp))
Future.successful(Redirect("/"))
Expand Down
30 changes: 19 additions & 11 deletions app/views/admin/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
@import play.api.libs.json.Json

@(title: String, user: Option[User] = None)(implicit lang: Lang)
@convertDistance(distance: Float) = @{
if (Messages("measurement.system") == "metric") distance * 1.60934.toDouble
else distance.toDouble
}
@main(title) {
@navbar(user, Some("/admin"))
<style>
Expand Down Expand Up @@ -144,9 +148,9 @@ <h1>Activities</h1>
</tr>
<tr>
<th>Audited Distance</th>
<th>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1))) miles</td>
<th>@("%.1f".format(StreetEdgeTable.auditedStreetDistanceToday())) miles</td>
<th>@("%.1f".format(StreetEdgeTable.auditedStreetDistanceYesterday())) miles</td>
<th>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1)))) @Messages("admin.overview.distance")</td>
<th>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistanceToday()))) @Messages("admin.overview.distance")</td>
<th>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistanceYesterday()))) @Messages("admin.overview.distance")</td>
</tr>
<tr>
<th>Total Validation Users</th>
Expand Down Expand Up @@ -253,31 +257,31 @@ <h1>Coverage</h1>
</tr>
<tr>
<th>Distance</th>
<td>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1))) miles</td>
<td>@("%.1f".format(StreetEdgeTable.totalStreetDistance())) miles</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1)))) @Messages("admin.overview.distance")</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.totalStreetDistance()))) @Messages("admin.overview.distance")</td>
<td>@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100))%</td>
</tr>
<tr style="font-size: 90%;">
<td style="padding-left: 30px">Registered</td>
<td>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1, "Registered"))) miles</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1, "Registered")))) @Messages("admin.overview.distance")</td>
<td></td>
<td>@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1, "Registered") * 100))%</td>
</tr>
<tr style="font-size: 90%;">
<td style="padding-left: 30px">Anonymous</td>
<td>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1, "Anonymous"))) miles</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1, "Anonymous")))) @Messages("admin.overview.distance")</td>
<td></td>
<td>@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1, "Anonymous") * 100))%</td>
</tr>
<tr style="font-size: 90%;">
<td style="padding-left: 30px">Turker</td>
<td>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1, "Turker"))) miles</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1, "Turker")))) @Messages("admin.overview.distance")</td>
<td></td>
<td>@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1, "Turker") * 100))%</td>
</tr>
<tr style="font-size: 90%;">
<td style="padding-left: 30px">Researcher</td>
<td>@("%.1f".format(StreetEdgeTable.auditedStreetDistance(1, "Researcher"))) miles</td>
<td>@("%.1f".format(convertDistance(StreetEdgeTable.auditedStreetDistance(1, "Researcher")))) @Messages("admin.overview.distance")</td>
<td></td>
<td>@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1, "Researcher") * 100))%</td>
</tr>
Expand Down Expand Up @@ -774,7 +778,8 @@ <h1>Label Search</h1>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<link href='@routes.Assets.at("stylesheets/admin.css")' rel="stylesheet"/>

<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/es.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/d3.v3.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/c3.min.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/Admin/build/Admin.js")'></script>
Expand All @@ -788,6 +793,9 @@ <h1>Label Search</h1>
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVLabel/src/SVLabel/Panomarker.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVValidate/src/util/PanoProperties.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/TimestampLocalization.js")'></script>
<script type="text/javascript">
updateTimestamps("@lang.code");
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-beta.33/vega.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/2.0.0-beta.4/vega-lite.js"></script>
Expand Down Expand Up @@ -853,7 +861,7 @@ <h1>Label Search</h1>
fallbackLng: 'en',
ns: ['common'],
defaultNS: 'common',
lng: "@lang.language",
lng: "@lang.code",
debug: false
}, function(err, t) {
var difficultRegionIds = @Json.toJson(RegionTable.difficultRegionIds);
Expand Down
8 changes: 6 additions & 2 deletions app/views/admin/user.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@import models.user.UserCurrentRegionTable
@import models.region.RegionPropertyTable

@(title: String, admin: Option[User] = None, user: Option[DBUser] = Some(DBUser("unknown", "unknown", "unknown")))
@(title: String, admin: Option[User] = None, user: Option[DBUser] = Some(DBUser("unknown", "unknown", "unknown")))(implicit lang: Lang)

@main(title) {
@navbar(admin)
Expand Down Expand Up @@ -184,7 +184,8 @@ <h1>Feedback</h1>
<link href='@routes.Assets.at("stylesheets/dataTables.bootstrap.min.css")' rel="stylesheet"/>
<link href='@routes.Assets.at("stylesheets/userProfile.css")' rel="stylesheet"/>

<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/es.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/d3.v3.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/c3.min.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/underscore.min.js")'></script>
Expand All @@ -198,6 +199,9 @@ <h1>Feedback</h1>
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVLabel/src/SVLabel/Panomarker.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVValidate/src/util/PanoProperties.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/TimestampLocalization.js")'></script>
<script type="text/javascript">
updateTimestamps("@lang.code");
</script>

<script src='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css' rel='stylesheet' />
Expand Down
4 changes: 2 additions & 2 deletions app/views/audit.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h2 id="link-neighborhood-name"><span id="status-holder-neighborhood-name"></spa
<div class="status-row" id="neighborhood-status-row">
<span class="status-column-half">
<img src='@routes.Assets.at("javascripts/SVLabel/img/icons/WalkingFeet2.png")' class="status-icon" alt="Map icon" align="">
<span><span class="bold" id="status-audited-distance">0.00</span> <small>@Messages("audit.right.ui.miles")</small></span>
<span><span class="bold" id="status-audited-distance">0.00</span> <small>@Messages("audit.right.ui.distance")</small></span>
</span>
<span class="status-column-half">
<img src='@routes.Assets.at("javascripts/SVLabel/img/icons/Sidewalk/Icon_Other.png")' class="status-icon" alt="Total label count" align="">
Expand Down Expand Up @@ -1039,7 +1039,7 @@ <h1 class="text-center bold">@Messages("surface.problem")</h1>
mainParam.missionSetProgress = @missionSetProgress;
mainParam.hasCompletedAMission = @hasCompletedMission;

mainParam.language = "@lang.language";
mainParam.language = "@lang.code";

svl.main = new Main(mainParam);
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/developer.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h3>Access Attributes</h3>
<dt>Optional:</dt>
<dd>You can pass a specific severity to look for and/or a specific filetype
for the returned dataset. Severity can be an integer value from 1-5 or
"none" to represent data without a severity rating.You can pass a
"none" to represent data without a severity rating. You can pass a
filetype that can be a string "csv" to represent data returned in
CSV format or "geojson" for the GeoJSON format. The GeoJSON format
is returned by default.</dd>
Expand All @@ -95,7 +95,7 @@ <h3>Access Attributes</h3>
<code>severity=[int|string]</code><br />
</li>
<li>
<code>filetype=csv|geojson</code><br />
<code>filetype=[string]</code><br />
</li>
</ul>
</td>
Expand Down
20 changes: 10 additions & 10 deletions app/views/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@import models.label._
@import models.street.StreetEdgeTable
@import play.api.libs.json.Json
@(title: String, user: Option[User] = None, cityName: String, stateAbbreviation: String, cityShortName: String, mapathonLink: Option[String], cityId: String, otherCityURLs: List[(String, String)])(implicit lang: Lang)
@(title: String, user: Option[User] = None, cityName: String, stateAbbreviation: String, cityShortName: String, mapathonLink: Option[String], cityId: String, otherCityURLs: List[(String, String)], auditedDistance: Float)(implicit lang: Lang)

@main(title) {
@navbar(user, Some("/"))
Expand Down Expand Up @@ -32,8 +32,9 @@
<a class="bodyStartBtn" href="@routes.AuditController.audit()">@Messages("navbar.explore") @cityShortName</a>
<br><br>
<span class="header-text">@Messages("landing.also.in")</span>
@for((cityName, cityURL) <- otherCityURLs.filter(_._1 != "San Pedro Garza García, MX-NLE")) {
<a id="@cityName" class="otherCityLink" href="@{cityURL + "/audit"}">@cityName</a> &nbsp;
@for((cityName, cityURL) <- otherCityURLs) {
<!-- Replacing a space with a nbsp in order to make sure wrapping works as intended. -->
<a id="@cityName" class="otherCityLink" href="@{cityURL + "/audit"}">@cityName.replace(" ", " ")</a> &nbsp;
}
<br>
@if(mapathonLink.isDefined) {
Expand Down Expand Up @@ -210,7 +211,7 @@
<div id="numberholder">
<div class="row" id="anim-numbers">
<div class="col-md-3 col-sm-4"><span id="percentage">45</span></div>
<div class="col-md-3 col-sm-4"><span id="nummiles">45</span></div>
<div class="col-md-3 col-sm-4"><span id="distance">45</span></div>
<div class="col-md-3 col-sm-4"><span id="numlabels">36,583</span></div>
<div class="col-md-3 hidden-sm"><a href="/validate"><span id="numvalidation">123,583</span></a></div>
</div>
Expand All @@ -224,15 +225,14 @@

</div>
<script language="javascript">
if(@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100))<100) {
document.getElementById('conditional-text').innerHTML = "@Messages("landing.stats.content.unfinished", "%.0f".format(StreetEdgeTable.auditedStreetDistance(1)), cityName, stateAbbreviation, "%.1f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100))";
if (@("%.0f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100)) < 100) {
document.getElementById('conditional-text').innerHTML = "@Messages("landing.stats.content.unfinished", "%,.0f".format(auditedDistance), cityName, stateAbbreviation, "%.1f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100))";
} else {
document.getElementById('conditional-text').innerHTML = "We did it! Users like you have mapped all @("%.0f".format(StreetEdgeTable.auditedStreetDistance(1))) miles of @cityName, @stateAbbreviation. However, we are not done. The more users who contribute, the better quality data. So start exploring today!";
document.getElementById('conditional-text').innerHTML = "@Messages("landing.stats.content.finished", "%,.0f".format(auditedDistance), cityName, stateAbbreviation)";
}

var percentageAnim = new CountUp("percentage", 0, @("%.1f".format(StreetEdgeTable.streetDistanceCompletionRate(1) * 100)),1,2.5,{suffix:'%'});
var labelsAnim = new CountUp("numlabels", 0, @LabelTable.countLabels,0,2.5,{suffix:''});
var milesAnim = new CountUp("nummiles", 0, @("%.1f".format(StreetEdgeTable.auditedStreetDistance(1))),1,2.5,{suffix:''});
var distanceAnim = new CountUp("distance", 0, @("%.1f".format(auditedDistance)),1,2.5,{suffix:''});
var validationsAnim = new CountUp("numvalidation", 0, @LabelValidationTable.countValidations,0,2.5,{suffix:''});
</script>
</div>
Expand Down Expand Up @@ -377,7 +377,7 @@
fallbackLng: 'en',
ns: ['common'],
defaultNS: 'common',
lng: "@lang.language",
lng: "@lang.code",
debug: false
}, function(err, t) {
var difficultRegionIds = @Json.toJson(RegionTable.difficultRegionIds);
Expand Down
6 changes: 5 additions & 1 deletion app/views/labelMap.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<link href='@routes.Assets.at("stylesheets/admin.css")' rel="stylesheet"/>

<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/es.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/Admin/build/Admin.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/jquery.dataTables.min.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/dataTables.bootstrap.min.js")'></script>
Expand All @@ -93,6 +94,9 @@
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVLabel/src/SVLabel/Panomarker.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/SVValidate/src/util/PanoProperties.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/TimestampLocalization.js")'></script>
<script type="text/javascript">
updateTimestamps("@lang.code");
</script>

<script src='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css' rel='stylesheet' />
Expand Down
6 changes: 5 additions & 1 deletion app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@
});
});
</script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/moment.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/lib/moment/es.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/TimestampLocalization.js")'></script>
<script type="text/javascript">
updateTimestamps("@lang.code");
</script>
</body>
2 changes: 1 addition & 1 deletion app/views/mobileValidate.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h3>@Messages("validate.mission.complete.category")</h3>
param.canvasHeight = window.innerHeight;
param.canvasWidth = window.innerWidth;
param.canvasCount = 1;
param.language = "@lang.language";
param.language = "@lang.code";
param.modalText = {
1: "@Messages("labeling.guide.curb.ramp.summary")",
2: "@Messages("labeling.guide.curb.ramp.summary")",
Expand Down
2 changes: 1 addition & 1 deletion app/views/rapidValidation.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ <h1 class="status-holder-header-2" id="label-type-counterexample"></h1>
param.canvasHeight = 130;
param.canvasWidth = 240;
param.canvasCount = 9;
param.language = "@lang.language";
param.language = "@lang.code";
param.modalText = {
1: "@Messages("labeling.guide.curb.ramp.summary")",
2: "@Messages("labeling.guide.curb.ramp.summary")",
Expand Down
Loading