Skip to content
Snippets Groups Projects
Commit 0dfac2c3 authored by ArtOfCode-'s avatar ArtOfCode-
Browse files

Unify user profile tabs

parent d69329d1
No related merge requests found
<div class="tabs">
<%= link_to user_path(current_user), class: "tabs--item" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to edit_user_registration_path, class: "tabs--item is-active" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item" do %>
Subscriptions
<% end %>
</div>
<%= render 'users/tabs', user: current_user %>
<h1>Edit Account Settings</h1>
......
<div class="tabs">
<%= link_to user_path(current_user), class: "tabs--item" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to edit_user_registration_path, class: "tabs--item" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item is-active" do %>
Subscriptions
<% end %>
</div>
<%= render 'users/tabs', user: current_user %>
<h1>Your Subscriptions</h1>
<p>These are all the email subscriptions you're currently signed up for. You can turn them off or remove them entirely from here.</p>
......
<div class="tabs">
<% puts user %>
<%= link_to user_path(user), class: "tabs--item #{current_page?(user_path(user)) ? 'is-active' : ''}" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to user_activity_path(user), class: "tabs--item #{current_page?(user_activity_path(user)) ? 'is-active' : ''}" do %>
Activity
<% end %>
<% if user == current_user %>
<%= link_to edit_user_registration_path, class: "tabs--item #{current_page?(edit_user_registration_path) ? 'is-active' : ''}" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item #{current_page?(edit_user_profile_path) ? 'is-active' : ''}" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item #{current_page?(subscriptions_path) ? 'is-active' : ''}" do %>
Subscriptions
<% end %>
<% end %>
</div>
\ No newline at end of file
<div class="tabs">
<%= link_to user_path(@user), class: "tabs--item" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to user_activity_path(@user), class: "tabs--item is-active" do %>
Activity
<% end %>
<% if @user == current_user %>
<%= link_to edit_user_registration_path, class: "tabs--item" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item" do %>
Subscriptions
<% end %>
<% end %>
</div>
<%= render 'tabs', user: @user %>
<h1>Activity for <%= link_to @user.username, user_path(@user) %></h1>
......
<div class="tabs">
<%= link_to user_path(current_user), class: "tabs--item" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to user_activity_path(current_user), class: "tabs--item" do %>
Activity
<% end %>
<% if @user == current_user %>
<%= link_to edit_user_registration_path, class: "tabs--item" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item is-active" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item" do %>
Subscriptions
<% end %>
<% end %>
</div>
<%= render 'tabs', user: current_user %>
<h1>Edit Profile</h1>
......
......@@ -12,25 +12,7 @@
</div>
<% end %>
<div class="tabs">
<%= link_to user_path(@user), class: "tabs--item is-active" do %>
<i class="fas fa-user"></i> Profile
<% end %>
<%= link_to user_activity_path(@user), class: "tabs--item" do %>
Activity
<% end %>
<% if @user == current_user %>
<%= link_to edit_user_registration_path, class: "tabs--item" do %>
Account
<% end %>
<%= link_to edit_user_profile_path, class: "tabs--item" do %>
Edit
<% end %>
<%= link_to subscriptions_path, class: "tabs--item" do %>
Subscriptions
<% end %>
<% end %>
</div>
<%= render 'tabs', user: @user %>
<div class="user-profile">
<div class="user-profile--image">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment