From 7e6bde7e36e58ee3be650490dbfe16bcfba97fbe Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 19:45:50 +0530 Subject: [PATCH 01/23] changed color of github icon and refactored code --- app/views/layouts/_header.html.erb | 5 +---- app/views/layouts/_social_icons.html.erb | 4 ++++ app/views/user_sessions/new.html.erb | 7 ++----- app/views/users/edit.html.erb | 6 +----- app/views/users/new.html.erb | 9 ++++----- 5 files changed, 12 insertions(+), 19 deletions(-) create mode 100644 app/views/layouts/_social_icons.html.erb diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 97149a684d..c6bf4f4861 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -186,10 +186,7 @@ <% if Rails.env == "production"%>
Log In with
- - -
- + <%= render :partial => "layouts/social_icons" %> <% end %> <% end %> diff --git a/app/views/layouts/_social_icons.html.erb b/app/views/layouts/_social_icons.html.erb new file mode 100644 index 0000000000..614515c35d --- /dev/null +++ b/app/views/layouts/_social_icons.html.erb @@ -0,0 +1,4 @@ + + + + diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index 80b1d7c19f..1bc3bfd8b1 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -36,16 +36,13 @@
- <% if Rails.env == "production"%> + <% if Rails.env == "development"%>
OR

Login with

- - - + <%= render :partial => "layouts/social_icons" %>
-
<% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 2f65b23f4d..77766a49f7 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -9,11 +9,7 @@
- - - - -
+ <%= render :partial => "layouts/social_icons" %>
<% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 3d09383472..66ee9fda0d 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -28,16 +28,15 @@
- - - - + <%= render :partial => "layouts/social_icons" %> +
<% end %> -
+

OR

+ <%= render 'form' %> From dabb6669b7a14749a3353dec27e960c8366c50c7 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Wed, 11 Jul 2018 10:49:09 -0400 Subject: [PATCH 02/23] Update _comment.html.erb (#3048) --- app/views/notes/_comment.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/notes/_comment.html.erb b/app/views/notes/_comment.html.erb index c88df03ff1..e9eb638b69 100644 --- a/app/views/notes/_comment.html.erb +++ b/app/views/notes/_comment.html.erb @@ -39,9 +39,12 @@ <% end %> - <% if comment.comment_via == 1 %> - - <% end %> + <% if comment.comment_via == 1 %> + + <% end %> + <% if local_assigns[:is_answer] && current_user && (current_user.role == "admin" || current_user.role == "moderator" || comment.uid == current_user.uid) %> + + <% end %> <% if current_user &. can_moderate? %> From 8faa9a0042dce27c3cea38bd108ceed027377ad6 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 21:15:13 +0530 Subject: [PATCH 03/23] changed icons styles --- app/views/layouts/_social_icons.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_social_icons.html.erb b/app/views/layouts/_social_icons.html.erb index 614515c35d..e8917b6a49 100644 --- a/app/views/layouts/_social_icons.html.erb +++ b/app/views/layouts/_social_icons.html.erb @@ -1,4 +1,4 @@ - - - - + + + + From 49ffe7c12d35cc62c9eafe9a2892f7268b38f8ac Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 21:16:23 +0530 Subject: [PATCH 04/23] changed env back --- app/views/user_sessions/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index 1bc3bfd8b1..e0b4bf6cd2 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -36,7 +36,7 @@
- <% if Rails.env == "development"%> + <% if Rails.env == "production"%>
OR

Login with

From d63a3daf39724b457e96ba40316288ae24655d68 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 21:28:37 +0530 Subject: [PATCH 05/23] some fixes --- app/views/layouts/_social_icons.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_social_icons.html.erb b/app/views/layouts/_social_icons.html.erb index e8917b6a49..30a6576162 100644 --- a/app/views/layouts/_social_icons.html.erb +++ b/app/views/layouts/_social_icons.html.erb @@ -1,4 +1,4 @@ - +
From 8edc7f9e2d8b5a1e83dfc06294a988b033144c61 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 21:37:51 +0530 Subject: [PATCH 06/23] all icons width set same --- app/views/layouts/_social_icons.html.erb | 8 ++++---- app/views/user_sessions/new.html.erb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_social_icons.html.erb b/app/views/layouts/_social_icons.html.erb index 30a6576162..1d72be8ab2 100644 --- a/app/views/layouts/_social_icons.html.erb +++ b/app/views/layouts/_social_icons.html.erb @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index e0b4bf6cd2..1bc3bfd8b1 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -36,7 +36,7 @@
- <% if Rails.env == "production"%> + <% if Rails.env == "development"%>
OR

Login with

From 69ff5670e14bbb453cd22f77bd68eddadcffe9d1 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 21:59:54 +0530 Subject: [PATCH 07/23] fix --- app/views/layouts/_header.html.erb | 22 ++++++++++++++-------- app/views/layouts/_social_icons.html.erb | 2 +- app/views/user_sessions/new.html.erb | 23 +++++++++++++---------- app/views/users/edit.html.erb | 7 +++---- app/views/users/new.html.erb | 11 ++++++----- 5 files changed, 37 insertions(+), 28 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index c6bf4f4861..eb0911af85 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -151,16 +151,27 @@ <%= t('layout._header.login.login_title') %> -
+ diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index 1bc3bfd8b1..afe761bc77 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -5,6 +5,18 @@

<%= raw t('user_sessions.new.log_in_or_sign_up', :url1 => "/signup") %>

<% if f.error_messages != "" %>
<%= f.error_messages %>
<% end %> +
+ <% if Rails.env == "production"%> +
+ <%= render :partial => "layouts/social_icons" %> +
+ + +
+ <% end %> +
+

OR

+

@@ -36,16 +48,7 @@

- <% if Rails.env == "development"%> -
OR
-

Login with

-
- <%= render :partial => "layouts/social_icons" %> -
- - -
- <% end %> +

<%= raw t('user_sessions.new.reset_by_clicking_here', :url1 => "/reset/") %>

<% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 77766a49f7..fa8160591b 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -3,15 +3,14 @@

<%= t('users.edit.edit_profile') %>


- <% if Rails.env == "production" %> + <% if Rails.env == "production"%>
-
- <%= render :partial => "layouts/social_icons" %> + <%= render :partial => "layouts/social_icons" %>
- <% end %> + <% end %> <%= render 'form' %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 66ee9fda0d..93abcaa902 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -27,16 +27,17 @@ <% if Rails.env == "production"%>
-
+ <%= render :partial => "layouts/social_icons" %> + + <% end %>
- <% end %> - +

OR

-
-
+ +
<%= render 'form' %> From a87e7e4788c4ffb02f8f6bb57cde0ab4434e1db7 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 22:01:18 +0530 Subject: [PATCH 08/23] added back env --- app/views/layouts/_header.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index eb0911af85..e002f0f4a3 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -155,11 +155,12 @@
  • <%= form_for :user_session, :as => :user_session, :url => { :controller => "user_sessions", :action => "create" }, :html => {:class => "form"} do |f| %>
    - + <% if Rails.env == "production"%>
    Log In with
    <%= render :partial => "layouts/social_icons" %>
    + <% end %> From 8de11f711ad6f2d77f6d0dffa321cab9b901fee2 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 22:15:10 +0530 Subject: [PATCH 09/23] some fix --- app/views/layouts/_header.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index e002f0f4a3..24e15da4a6 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -155,7 +155,7 @@
  • <%= form_for :user_session, :as => :user_session, :url => { :controller => "user_sessions", :action => "create" }, :html => {:class => "form"} do |f| %>
    - <% if Rails.env == "production"%> + <% if Rails.env == "production" %>
    Log In with
    <%= render :partial => "layouts/social_icons" %> From 1804904fc637df6f60536fe82fc0849bbdcd5765 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Wed, 11 Jul 2018 12:48:21 -0400 Subject: [PATCH 10/23] Update API.md --- doc/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/API.md b/doc/API.md index 1963f862bd..e745b97bcd 100644 --- a/doc/API.md +++ b/doc/API.md @@ -16,7 +16,7 @@ Per-model API endpoints are: * Questions: https://publiclab.org/api/srch/questions?srchString=foo * Tags: https://publiclab.org/api/srch/tags?srchString=foo * Notes: https://publiclab.org/api/srch/notes?srchString=foo -* Locations: https://publiclab.org/api/srch/locations?srchString=lat,lon +* TagLocations: https://publiclab.org/api/srch/taglocations?srchString=lat,lon * PeopleLocations: https://publiclab.org/api/srch/peoplelocations?srchString=QRY **** @@ -104,4 +104,4 @@ https://github.com/publiclab/plots2/blob/master/app/controllers/comment_controll "username": "user", "body": "This is a comment made with a token" } - ``` \ No newline at end of file + ``` From 7eb20929891a05b7c1ca72e3b050c7e74e9f6539 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 22:19:48 +0530 Subject: [PATCH 11/23] center align the text --- app/views/layouts/_header.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 24e15da4a6..ce002f9b02 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -155,12 +155,12 @@
  • <%= form_for :user_session, :as => :user_session, :url => { :controller => "user_sessions", :action => "create" }, :html => {:class => "form"} do |f| %>
    - <% if Rails.env == "production" %> -
    Log In with
    + +
    <%= render :partial => "layouts/social_icons" %>
    - <% end %> + From 9c8b0a764bea07238a663a508d0d99a645575b00 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 22:28:55 +0530 Subject: [PATCH 12/23] center align and added or --- app/views/layouts/_header.html.erb | 5 ++++- app/views/user_sessions/new.html.erb | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index ce002f9b02..8501d2a863 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -155,11 +155,14 @@
  • <%= form_for :user_session, :as => :user_session, :url => { :controller => "user_sessions", :action => "create" }, :html => {:class => "form"} do |f| %>
    - + <% if Rails.env == "production"%>
    <%= render :partial => "layouts/social_icons" %>
    + + + <% end %> diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index afe761bc77..8dec82353e 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -6,15 +6,15 @@ <% if f.error_messages != "" %>
    <%= f.error_messages %>
    <% end %>
    - <% if Rails.env == "production"%> -
    + +
    <%= render :partial => "layouts/social_icons" %>

    - <% end %> -
    + +

    OR


    From 36f0bca966c1d45e7f4b4377c29c902829695c65 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Wed, 11 Jul 2018 22:34:13 +0530 Subject: [PATCH 13/23] added back env --- app/views/user_sessions/new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/user_sessions/new.html.erb b/app/views/user_sessions/new.html.erb index 8dec82353e..bea968eaca 100644 --- a/app/views/user_sessions/new.html.erb +++ b/app/views/user_sessions/new.html.erb @@ -6,14 +6,14 @@ <% if f.error_messages != "" %>
    <%= f.error_messages %>
    <% end %>
    - + <% if Rails.env == "production"%>
    <%= render :partial => "layouts/social_icons" %>

    - + <% end %>

    OR

    From 99576fe6d3c43d4091c541e6dd6ebf3742dd8ec6 Mon Sep 17 00:00:00 2001 From: dewanhimanshu Date: Thu, 12 Jul 2018 00:23:20 +0530 Subject: [PATCH 14/23] added spacing in or --- app/views/layouts/_header.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 8501d2a863..aa500f1ae7 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -151,18 +151,18 @@ <%= t('layout._header.login.login_title') %> -