-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #591 from hennevogel/bugfix/user-show-performance
Bugfix user show performance
- Loading branch information
Showing
8 changed files
with
79 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
-if projects | ||
%table.table | ||
%thead | ||
- projects.each_with_index do |project, index| | ||
%tr | ||
%td{:class => "#{project.aasm_state}"} | ||
= render :partial => "projects/list_item", :locals => {:project => project, :index => index } | ||
- projects.each_with_index do |project, index| | ||
%div{class: "#{project.aasm_state}", style: "border-bottom: 1px solid #ddd; padding: 10px 0 10px 0;"} | ||
= render :partial => "projects/list_item", :locals => {:project => project, :index => index } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%p | ||
- if action_name == 'show' | ||
No project yet, join one! | ||
- if @user == current_user | ||
Check out your | ||
= link_to opportunities_user_path(@user) do | ||
opportunities. | ||
- if action_name == "opportunities" | ||
No project is matching your keywords yet, try adding some more on the right. | ||
- if action_name == "originated" | ||
No ideas yet. | ||
- if @user == current_user | ||
How about you | ||
= link_to new_project_path do | ||
create one? | ||
- if action_name == "likes" | ||
No likes yet, spread some | ||
%i.fa.fa-heart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
%ul.nav.nav-tabs | ||
- all_state = "active" if action_name == "index" | ||
%li{:class => all_state} | ||
=link_to projects_path, :title => "All projects" do | ||
All | ||
- works_state = "active" if action_name == "show" | ||
%li{:class => works_state} | ||
=link_to user_path(@user), :title => "Ideas #{@user.name} came up with" do | ||
%span | ||
Works on | ||
- originated_state = "active" if action_name == "originated" | ||
%li{:class => originated_state} | ||
=link_to originated_user_path(@user), :title => "Ideas #{@user.name} came up with" do | ||
%span | ||
Originated | ||
- likes_state = "active" if action_name == "likes" | ||
%li{class: likes_state} | ||
=link_to likes_user_path(@user), title: "Things #{@user.name} likes" do | ||
%span.hidden-xs | ||
Likes | ||
%i.fa.fa-star.visible-xs | ||
- opportunities_state = "active" if action_name == "opportunities" | ||
%li{:class => opportunities_state} | ||
=link_to opportunities_user_path(@user), title: "Things #{@user.name} could hack on" do | ||
%span.hidden-xs | ||
Opportunities | ||
%i.fa.fa-user.visible-xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters