This repository has been archived by the owner on May 17, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the HubStar toggle to the Repositories#show page
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,10 @@ div.intro { | |
.forks span { | ||
background-position: 5px -52px; | ||
} | ||
|
||
.hubstars p { | ||
margin: 0; | ||
} | ||
} | ||
} | ||
|
||
|
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,13 +1,21 @@ | ||
<h2>Users who starred <%= link_to(@repo.to_s, @repo.link) %></h2> | ||
|
||
<% @repo.users.each do |user| %> | ||
<% @users.each do |user| %> | ||
<div class="row user-info"> | ||
<div class="span1 user-avatar"><%= image_tag(user.avatar_url, size: '48x48') %></div> | ||
<div class="span11"> | ||
<div class="span9"> | ||
<h3><%= link_to(user.username, user.html_url) %></h3> | ||
<span class="description"> | ||
<%= user.name %> | ||
</span> | ||
</div> | ||
<div class="span2 repo-stats"> | ||
<%- if user == current_user %> | ||
<div class="hubstars hubstarred"> | ||
<p class="hint">Toggle HubStar:</p> | ||
<%= link_to(@repo.stars, repository_path(@repo), class: 'toggle', data: {id: @repo.name}) %> | ||
</div> | ||
<%- end %> | ||
</div> | ||
</div> | ||
<% end %> |