diff --git a/app/views/leaderboards/_mini_leaderboard.html.erb b/app/views/leaderboards/_mini_leaderboard.html.erb index e812fbb..298e4dd 100644 --- a/app/views/leaderboards/_mini_leaderboard.html.erb +++ b/app/views/leaderboards/_mini_leaderboard.html.erb @@ -41,6 +41,11 @@ <% end %> <%= render "shared/user_mention", user: entry.user, show: [:neighborhood] %> + <% if entry.user == current_user && current_user.github_username.blank? %> + + <%= link_to "Link active projects", my_settings_path(anchor: "user_github_account"), target: "_blank" %> + + <% end %> <% if @active_projects&.dig(entry.user_id).present? %> working on <%= link_to @active_projects[entry.user_id].project_name, @active_projects[entry.user_id].repo_url, target: "_blank" %> diff --git a/app/views/static_pages/_currently_hacking.erb b/app/views/static_pages/_currently_hacking.erb index 4c9950d..e612c0c 100644 --- a/app/views/static_pages/_currently_hacking.erb +++ b/app/views/static_pages/_currently_hacking.erb @@ -18,6 +18,11 @@ working on <%= link_to active_projects[user.id].project_name, active_projects[user.id].repo_url, target: "_blank" %> <% end %> + <% if user == current_user && user.github_username.blank? %> + + <%= link_to "Link active projects", my_settings_path(anchor: "user_github_account"), target: "_blank" %> + + <% end %> <% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 3c8cf66..c4fcca1 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -45,6 +45,9 @@

GitHub Account

+

+ This is used to show your active projects on the leaderboard & current hacking activity on the dashboard. +

<% if @user.github_uid.present? %>

Your GitHub account is linked. <%= link_to "@#{@user.github_username}", "https://github.com/#{@user.github_username}", target: "_blank" %>

<% else %>