Skip to content

Commit

Permalink
new navbar (#6508)
Browse files Browse the repository at this point in the history
* new navbar but should mostly be in a feature

* Changed the hyperlink text in Login/Signup Model (#6364)

* Changed the hyperlink text in Login/Signup Model

Issue Number #6360

* Updated Hyperlink Text

* Updated Text in HyperLink

* Update _nodes.html.erb

* Functional Tests for Ordering aphabetically (#6371)

* test ordering of tags

* test that wikis are ordered alphabetically based on title

* Fix failing test on wiki test

* Change 'Read More' blog link to button (#6537)

* OpenGraph for Twitter

* Update _new_question.html.erb

* Add questions and comments to profile cards (#6472)

* add # notes, questions, comments to user profile

* fix codeclimate errors

* display correct node type at top of tag/author page

* fix /profile/comments/ to show by username

* add route for comments by tagname, link added in profile

* add styling to profile page cards

* refactored Node.find_by_tag_and_author to use Node.questions

* change display of note/question/comment links

* add unit test for Comment.find_by_tag_and_author

* add unit test for Node.find_by_tag_and_author

* add assert for questions type in test find by name and user id

* remove light grey footer background

* Removed style-breaking classes from table (#6374)

* Update 503.html - replace http with https (#6562)

* Update 502.html - replace http with https (#6561)

* Update 500.html - replace http with https (#6560)

* Update 422.html - replace http with https (#6559)

* Update 404.html - replace http with https (#6558)

* Update index.html - replace http with https (#6557)

* change the function named t(...) to translation(...) (#6580)

* Flow: Button to post marker + Popup working for multiple maps (#6591)

* init

* LEL pointed to different branch

* popups working

* removed forked leaflet

* button working great

* CSS changes of button

* CSS changed to orignal bootstrap button

* Updated the user.rb file to bootstrap italic (#6535)

* Update README.md file (#6510)

Added link to first-timers-only issue template.

* Fix comment spelling error (#6521)

* Fix icon color on btn-outline-secondary buttons #6518 (#6520)

* Bump chart.js from 2.8.0 to 2.9.1 (#6567)

Bumps [chart.js](https://github.com/chartjs/Chart.js) from 2.8.0 to 2.9.1.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](chartjs/Chart.js@v2.8.0...v2.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Changed from function t to translation (#6609)

Issue resolved: Change function t to translation in dashboard/_node_comment #6600

* Update _edit.html.erb (#6583)

* Update _comments.html.erb (#6585)

I changed the function named t(....) to be named as translations(...).

* Update user.rb (#6587)

* Change function t to translation in dashboard/_node_wiki (#6607)

* Update_function t to translation in comments/_form (#6608)

* wiki/methods: Change t to translation in (#6564)

Changes the function name from t to translation in wiki/methods

Fixes #6540

* t(....) named as translations(...) on lines 25, 30, 35 and 38 (#6552)

* t(....) named as translations(...) on lines 25, 30, 35 and 38

* fix type translations to translation

* Change function t to translations in comments/_edit

* Revert "Change function t to translations in comments/_edit"

This reverts commit e858b75.

* changed t function name (#6546)

* changed t function name

* name fix

* change funcion t to translations in users/spamaway (#6545)

* change funcion t to translations in users/spamaway

* fix typo

* Change function t to translations in comments/comments #6538 (#6543)

* Change function t to translations

Change function t to translations in comments/comments

* Change translations to translation

* Update _node_meta.html.erb (#6606)

Changing method "t" to "translation"

* Fix follow button bug on tags (#6576)

* Fix bug on issue #6570

* Persist data

* Add co-authored posts to profile.html.erb (#6418)

* Add co-authored posts to profile.html.erb

* Update profile.html.erb

* Adjustments to tag graph labeling

* Update stats.html.erb

* Change function to to translation #6603 (#6659)

Change function t to translation in dashboard/_node_question #6603
#6603

* Refresh button (#6507)

* added tooltip for refresh button

* changes

* new changes1

* #6539 Updated t to translations. (#6544)

* Updated t to translations.

* Updated translations to translation.

Error in issue description.

* Changed t to translation in _node_moderate (#6695)

* some translations adjustments

* Add more tests for Node (for note and wiki page titles) (#6366)

* Add more tests for Node

* Prevent titles that are empty, blank or too short

* Update functional tests

* Add Redis installation to readme (#6398)

* Fix recent questions on shadow page (#6342)

* Add package.json, package-lock and test.sqlite-journal to gitingore #6384 (#6385)

* Make "choose one" link in comment forms appear underlined (#6401)

* Underline "choose one" link

Make "choose one" link in comment forms appear underlined #6399

* Add a CSS class to underline text

* Add !important to underline CSS class

* Fix rubocop errors in app/api & app/channels (#6425)

* Fix rubocop errors in app/api & app/channels

* Fix rubocop guardclause offenses

* Add tag link to show question (#6430)

* simple fix for link

* not sure what that file was

* removed redundant comment count being showed in blog section (#6746)

* Update t() function to translation() (#6729)

#6728

* Add redis installations for linux (#6751)

* Bump rake from 12.3.3 to 13.0.1 (#6764)

Bumps [rake](https://github.com/ruby/rake) from 12.3.3 to 13.0.1.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](ruby/rake@v12.3.3...v13.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update _comments.html.erb (#6766)

* Update _comments.html.erb

Changed the t() to translation() in line 4, 18 and 21.

* Update _comments.html.erb

Changed the two translation() back to t() on line 18.

* Full screen button added in inline maps, Multiple maps in Wiki page works now. (#6699)

* full screen added

* working on wiki page

* code refactoring

* console logs removed

* inline map layers are ON by default now

* version bump of LEL to add new Layers

* api changed tagslocation init

* api taglocations changed

* popup content changed

* PL.editor shows map if lat,lon passed in URL. (#6788)

* pl-editor shows map

* indentation

* yarn.lock added for PL.editor

* safe traverse syntax used

* map API using common global variable. (#6802)

* done

* removed console logs

* [Security] Bump https-proxy-agent from 2.2.1 to 2.2.4 (#6803)

Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.4. **This update includes security fixes.**
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](TooTallNate/proxy-agents@2.2.1...2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update _thumbnail.html.erb to make it consistent with new card display (#6581)

* Update _thumbnail.html.erb

* Update style.css

* Update node_shared_test.rb

* Update _thumbnail.html.erb

* Update _notes.html.erb

* Update _notes.html.erb

* Update _notes.html.erb

* added ApplicationController.helpers.logged_in_as

* Update _notes.html.erb

* self.current_user in application_helper.rb

* Update application_helper.rb

* switch to "@current_user && ['admin','moderator'].includes?(@current_user.role)"

* PL.editor shows map if lat,lon passed in URL. (#6788)

* pl-editor shows map

* indentation

* yarn.lock added for PL.editor

* safe traverse syntax used

* handle nils

* Update _notes.html.erb

* new navbar but should mostly be in a feature

* some translations adjustments

* final navbar

* fixes for collapse menu

* fixes for collapse menu 2

* rest of menus
  • Loading branch information
jywarren authored Nov 21, 2019
1 parent 39115b4 commit dcc619c
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 50 deletions.
3 changes: 0 additions & 3 deletions app/assets/javascripts/application/i18n/translations.js

This file was deleted.

5 changes: 4 additions & 1 deletion app/views/features/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<h2>New Feature</h2>

</div>

<div class="row">
<% url = { :controller => "features", :action => "create", :id => params[:id] } %>

<%= form_for :revision, :as => :revision, :url => url, :html => {:class => "form card bg-light card-body"} do |f| %>
<%= form_for :revision, :as => :revision, :url => url, :html => {:class => "form"} do |f| %>

<% if f.error_messages != "" %><div class="alert alert-danger"><%= f.error_messages :header_message => "Your note couldn't be saved." %></div><% end %>

Expand Down
95 changes: 51 additions & 44 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% cache('feature_anniversary-banner', skip_digest: true) do %>
<% cache('feature_anniversary-banner', skip_digest: true) do %>
<%= feature('anniversary-banner') %>
<% end %>

Expand All @@ -25,23 +25,40 @@
</form>

<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown" style="min-width: 105px;">

<% cache('feature_navbar', skip_digest: true) do %>
<%= feature('navbar') %>
<% end %>

<li class="nav-item dropdown" style="min-width:80px;">
<a class="nav-link" data-toggle="dropdown" href="#">
Get Involved
<%= translate('Community') %>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/events">Attend an event</a>
<a class="dropdown-item" href="/chat">Chat online</a>
<a class="dropdown-item" href="/questions">Ask a question</a>
<a class="dropdown-item" href="/tags">Find a topic you care about</a>
<a class="dropdown-item requireLogin" href="/post">Post your work</a>
<a class="dropdown-item" href="/newsletter">Subscribe to the newsletter</a>
<a class="dropdown-item" href="/requests">Respond to a request</a>
<a class="dropdown-item" href="/getting-started"><b><%= translate('Get started') %> &raquo;</b></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/dashboard">Browse recent research</a>
<a class="dropdown-item" href="/methods">Discover methods</a>
<a class="dropdown-item" href="/kits">Contribute a kit</a>
<a class="dropdown-item" href="/wiki/software-outreach">Software Projects</a>
<a class="dropdown-item" href="/people"><%= translate('People') %></a>
<a class="dropdown-item" href="/projects"><%= translate('Projects') %></a>
<a class="dropdown-item" href="/events"><%= translate('Events') %></a>
<a class="dropdown-item" href="/questions"><%= translate('Questions') %></a>
<a class="dropdown-item" href="/chat"><%= translate('Chat') %></a>
</div>
</li>

<li class="nav-item dropdown" style="min-width:80px;">
<a class="nav-link" data-toggle="dropdown" href="#">
<%= translate('Tools') %>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/methods"><%= translate('Methods') %></a>
<h6 class="dropdown-header">Kits</h6>
<a class="dropdown-item" href="/kits"><%= translate('Kits initiative') %></a>
<a class="dropdown-item" href="//store.publiclab.org"><%= translate('Store') %></a>
<h6 class="dropdown-header">Software</h6>
<a class="dropdown-item" href="https://mapknitter.org"><%= translate('MapKnitter') %></a>
<a class="dropdown-item" href="https://infragram.org"><%= translate('Infragram') %></a>
<a class="dropdown-item" href="https://spectralworkbench.org"><%= translate('Spectral Workbench') %></a>
<a class="dropdown-item" href="https://code.publiclab.org#r=all"><%= translate('Code community') %></a>
</div>
</li>

Expand All @@ -50,26 +67,22 @@
<%= t('layout._header.about.about_title') %>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="/wiki/stories"><%= t('layout._header.about.stories') %></a>
<a class="dropdown-item" href="/blog"><%= t('layout._header.about.blog') %></a>
<a class="dropdown-item" href="/about"><%= t('layout._header.about.about_public_lab') %></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/wiki/plots-staff"><%= t('layout._header.about.team') %></a>
<a class="dropdown-item" href="/wiki/organizers"><%= t('layout._header.about.organizers') %></a>
<a class="dropdown-item" href="/wiki/board"><%= t('layout._header.about.board') %></a>
<a class="dropdown-item" href="/wiki/how-we-are-funded"><%= t('layout._header.about.fund') %></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/media"><%= t('layout._header.about.press_and_media') %></a>
<a class="dropdown-item" href="/blog"><%= t('layout._header.about.blog') %></a>
<a class="dropdown-item" href="/newsletter"><%= t('Newsletter') %></a>
<a class="dropdown-item" href="/wiki/contact"><%= t('layout._header.about.contact') %></a>
</div>
</li>

<li class="nav-item d-sm-none d-lg-inline">
<a class="nav-link" target="_blank" href="//store.publiclab.org"><%= t('layout._header.store') %></a>
<li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
<a class="nav-link btn btn-outline-secondary" target="_blank" href="//store.publiclab.org"><%= t('layout._header.store') %></a>
</li>
<li class="nav-item d-sm-none d-lg-inline">
<a class="nav-link" href="/donate"><%= t('layout._header.donate') %></a>
<li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
<a class="nav-link btn btn-outline-secondary" href="/donate"><%= t('layout._header.donate') %></a>
</li>

<!-- end navbar feature -->

</ul>

<ul class="navbar-nav mr-lg-5">
Expand Down Expand Up @@ -134,23 +147,17 @@
<% end %>
</li>
<li id="md-ham" class="d-xl-none dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-white fa-bars"></span></a>
<ul class="dropdown-menu">
<li class="d-lg-none">
<a href="//store.publiclab.org"><%= t('layout._header.store') %></a>
</li>
<li class="d-lg-none">
<a href="/donate"><%= t('layout._header.donate') %></a>
</li>
<!--These menu items will only appear in the "More" dropdown menu. -->
<% if current_user %>
<li class="d-xl-none">
<a rel="tooltip" title="<%= t('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
</li>
<% else %>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= t('layout._header.become_part_community') %>" href="/signup"><%= t('layout._header.join') %></a>
<% end %>
</div>
<a href="#" class="btn btn-dark" data-toggle="dropdown"><span class="fa fa-white fa-bars"></span></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item d-lg-none" href="//store.publiclab.org"><%= t('layout._header.store') %></a>
<a class="dropdown-item d-lg-none" href="/donate"><%= t('layout._header.donate') %></a>
<!--These menu items will only appear in the "More" dropdown menu. -->
<% if current_user %>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= t('layout._header.your_dashboard') %>" data-placement="bottom" href="/dashboard">Dashboard</a>
<% else %>
<a class="dropdown-item d-xl-none" rel="tooltip" title="<%= t('layout._header.become_part_community') %>" href="/signup"><%= t('layout._header.join') %></a>
<% end %>
</div>
</li>
</div>
</nav>
Expand Down
1 change: 0 additions & 1 deletion config/i18n-js.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
translations:
- file: "app/assets/javascripts/application/i18n/translations.js"
only: '*.js.*'
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ en:
board: "Non-profit board"
fund: "How we're funded"
press_and_media: "Press and Media"
contact: "Contact the staff"
contact: "Contact"
get_involved:
get_involved_title: "Get Involved"
getting_started: "Getting started"
Expand Down

0 comments on commit dcc619c

Please sign in to comment.