Skip to content

Commit

Permalink
Fix #11074 (#11157)
Browse files Browse the repository at this point in the history
* Add new strings to en.yml

* Update _dashboard.html.erb
  • Loading branch information
christinecannon authored Jun 1, 2022
1 parent f75dcea commit f068ba4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app/views/sidebar/_dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="btn-group" role="group">
<a class="btn btn-primary btn-lg dropdown-toggle fa-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
<span class="sr-only"><%= translation('dashboard._header.dropdown.toggle_dropdown') %></span>
</a>
<div class="dropdown-menu dropdown-menu-right mt-2">
<%= create_nav_dropdown_item("post?n=15322&title=How%20to%20...&tags=activity:new,draft","dashboard._header.dropdown.share_activity") %>
Expand All @@ -21,14 +21,19 @@
<% if current_user.has_power_tag("lat") && current_user.has_power_tag("lon")%>
<div style="margin: 2.2rem 0;">
<a class="btn btn-lg btn-outline-secondary" href="https://publiclab.org/map/#<%= current_user.get_value_of_power_tag("zoom").to_i%>/<%=current_user.lat.to_f %>/<%=current_user.lon.to_f %>">
<i class="fa fa-map-marker" style="color:#c40;"></i> Nearby Activity</a>
<i class="fa fa-map-marker" style="color:#c40;"></i> <%= translation('dashboard_v2.sidebar.nearby_activity') %></a>
</div>
<%else %>
<div style="margin: 2.2rem 0;">
<a class="btn btn-lg btn-outline-secondary blurred-location-input" submit_to="/profile/tags/create/<%= current_user.uid %>"><i class="fa fa-map-marker" style="color:#c40;"></i> Add your location</a>
<a class="btn btn-lg btn-outline-secondary blurred-location-input" submit_to="/profile/tags/create/<%= current_user.uid %>">
<i class="fa fa-map-marker" style="color:#c40;"></i>
<%= translation('dashboard_v2.sidebar.add_location') %>
</a>
<p style="font-size: smaller; margin: 0.3rem 0;">
Add your location to see work near you<br>
<a href="https://publiclab.org/location-privacy" target="_blank">About location privacy »</a>
<%= translation('dashboard_v2.sidebar.location_work') %><br>
<a href="https://publiclab.org/location-privacy" target="_blank">
<%= translation('dashboard_v2.sidebar.location_privacy') %> »
</a>
</p>
</div>
<% end %>
Expand Down Expand Up @@ -60,7 +65,7 @@
<% end %>
<!-- Twitter follow button, options can be adjusted here: https://publish.twitter.com/# -->
<div class="social-media-btn">
<a href="https://twitter.com/PublicLab?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-size="large" data-show-count="false">Follow @PublicLab</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<a href="https://twitter.com/PublicLab?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-size="large" data-show-count="false"><%= translation('dashboard._sidebar.follow_publiclab') %></a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
<!-- Facebook like button, options can be adjusted here: https://developers.facebook.com/docs/plugins/like-button/ -->
<div class="social-media-btn">
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ en:
air_quality: "Air Quality"
water_quality: "Water Quality"
developers: "Developers"
follow_publiclab: "Follow @PublicLab"
_activity:
activity: "Activity"
all_updates: "All updates"
Expand Down Expand Up @@ -367,6 +368,7 @@ en:
ask_question: "Ask a question"
post_event: "Post an event"
tell_story_blog: "Tell your story on the blog"
toggle_dropdown: "Toggle Dropdown"
dashboard: "Dashboard"
community_research: "Community research"
welcome: "Welcome"
Expand Down

0 comments on commit f068ba4

Please sign in to comment.