-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor code for projects with multiple repositories
Add org_owner? method to Collective model Update navigation in index and show views
- Loading branch information
Showing
9 changed files
with
113 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<h3>Audit</h3> | ||
|
||
<div class='row'> | ||
<div class='col-12'> | ||
<ul> | ||
<li> | ||
<strong>Owned by an org:</strong> | ||
<%= @collective.org_owner? ? '✅' : '❌' %> | ||
</li> | ||
<li> | ||
<strong>Repositories found:</strong> | ||
<%= @collective.projects_with_repository.any? ? '✅' : '❌' %> | ||
</li> | ||
<li> | ||
<strong>Open Source License:</strong> | ||
<%= !@collective.no_license? ? '✅' : '❌' %> | ||
</li> | ||
<li> | ||
<strong>Active Repositories:</strong> | ||
<%= !@collective.inactive? ? '✅' : '❌' %> | ||
</li> | ||
<% if @collective.archived? %> | ||
<li> | ||
<strong>Unarchived Repositories:</strong> | ||
<%= !@collective.archived? ? '✅' : '❌' %> | ||
</li> | ||
<% end %> | ||
<li> | ||
<strong>Funding links:</strong> | ||
<%= !@collective.no_funding? ? '✅' : '❌' %> | ||
</li> | ||
<% if @collective.missing_s? %> | ||
<li> | ||
<strong>Missing s:</strong> | ||
<%= !@collective.missing_s? ? '✅' : '❌' %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> |
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,23 @@ | ||
<ul class="nav nav-tabs my-3"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" href='/'> | ||
Collectives | ||
<span class="badge text-bg-secondary"> | ||
<%= number_with_delimiter Collective.all.count %> | ||
</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href='/projects'> | ||
Projects | ||
<span class="badge text-bg-secondary"> | ||
<%= number_with_delimiter Project.with_repository.active.count %> | ||
</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href='/audit'> | ||
Audit | ||
</a> | ||
</li> | ||
</ul> |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<ul class="nav nav-tabs my-3"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href='/'> | ||
Collectives | ||
<span class="badge text-bg-secondary"> | ||
<%= number_with_delimiter Collective.all.count %> | ||
</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link active" href='/projects'> | ||
Projects | ||
<span class="badge text-bg-secondary"> | ||
<%= number_with_delimiter Project.with_repository.active.count %> | ||
</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href='/audit'> | ||
Audit | ||
</a> | ||
</li> | ||
<li class="nav-item ms-auto"> | ||
<div class="dropdown"> | ||
<button class="btn btn-light dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Sort | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item <%= 'active' if params[:sort] == 'last_synced_at' %>" href="<%= url_for(sort: 'last_synced_at', order: 'desc') %>">Recently synced</a></li> | ||
<li><a class="dropdown-item <%= 'active' if params[:stars] == 'stars' %>" href="<%= url_for(sort: 'stars', order: 'desc') %>">Stars</a></li> | ||
</ul> | ||
</div> | ||
</li> | ||
</ul> |
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