This repository was archived by the owner on Oct 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Tag and filter meet-with-a-mentor requests (Issue #15) #73
Open
steven-ferguson
wants to merge
9
commits into
code-scouts:master
Choose a base branch
from
steven-ferguson:tag-requests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e238071
adds integration test for adding concept
steven-ferguson acfe007
adds concept tagging when editing request
steven-ferguson 02705f1
cleans up request show view
steven-ferguson 200e885
adds tags on request creation
steven-ferguson 6ff6390
adds filtering of requests by concept
steven-ferguson 2bbfae6
removes extra rows and global js functions
steven-ferguson 48bbb37
changes css class from concept to concept-tag
steven-ferguson 25e5fd0
Merge branch 'master' of https://github.com/code-scouts/green_mercury…
steven-ferguson e136083
Update meeting_request form
steven-ferguson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
$(function() { | ||
$('.concept-search').click(function() { | ||
$(this).toggleClass('badge-success'); | ||
if ($('.badge-success').length === 0) { | ||
$('.request').show(); | ||
} else { | ||
$('#open-requests').children('.request').hide(); | ||
showRelated(getSelectedConceptNames()); | ||
} | ||
}); | ||
}); | ||
|
||
function getSelectedConceptNames() { | ||
return $('.badge-success').map(function() { | ||
return $(this).attr('data-name').toLowerCase(); | ||
}); | ||
} | ||
|
||
function showRelated(tagNames) { | ||
tagNames.each(function() { | ||
$('[data-' + this + '="true"]').show(); | ||
}); | ||
} |
This file contains hidden or 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 |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
*= require_tree . | ||
*/ | ||
|
||
@import 'bootstrap/glyphicons'; | ||
|
||
footer { | ||
position: relative; | ||
width: 370px; | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
<li class='badge concept-search' data-name='<%= escape_attribute_name(concept.name) %>'><%= concept.name %></li> |
27 changes: 14 additions & 13 deletions
27
app/views/meeting_requests/_mentor_requests_index.html.erb
This file contains hidden or 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,17 +1,18 @@ | ||
<div class="row"> | ||
<div class="span12"> | ||
<h3>My Claimed Requests</h3> | ||
<%= render 'requests_list', meeting_requests: current_user.claimed_meeting_requests, users: @claimed_users %> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="span8"> | ||
<section id='my-requests' class='span12'> | ||
<h3>My Claimed Requests</h3> | ||
<%= render 'requests_list', meeting_requests: current_user.claimed_meeting_requests, users: @claimed_users %> | ||
</section> | ||
<section class='row-fluid'> | ||
<div id='open-requests' class='span9'> | ||
<h3>Open Requests</h3> | ||
<%= render 'requests_list', meeting_requests: current_user.open_meeting_requests, users: @open_users %> | ||
</div> | ||
|
||
<div class="span4"> | ||
<h4>Concepts</h4> | ||
<div class="span3 concepts"> | ||
<h3>Concepts</h3> | ||
<p>Click on a concept to see related requests</p> | ||
<ul class='inline'> | ||
<%= render partial: "concept", collection: @concepts %> | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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,16 +1,18 @@ | ||
<ul class="plain-list"> | ||
<% meeting_requests.each do |meeting_request| %> | ||
<li class="extra-margin-bottom"> | ||
<div class="row"> | ||
<%= link_to meeting_request.title, meeting_request_path(meeting_request) %> | ||
</div> | ||
|
||
<div class="row muted"> | ||
<%= meeting_request.created_at.strftime("%B %d, %Y") %> | ||
<% if current_user.is_mentor? %> | ||
| <%= users[meeting_request.member_uuid].name %> | ||
<% end %> | ||
</div> | ||
</li> | ||
<% meeting_requests.each do |meeting_request| %> | ||
<% if meeting_request.concepts.any? %> | ||
<div class='request' | ||
<% meeting_request.concepts.each do |concept| %> | ||
data-<%= escape_attribute_name(concept.name) %>='true' | ||
<% end %> | ||
> | ||
<% else %> | ||
<div class='request'> | ||
<% end %> | ||
</ul> | ||
<%= link_to meeting_request.title, meeting_request_path(meeting_request) %> | ||
<p class="muted"> | ||
<%= meeting_request.created_at.strftime("%b %d") %> | ||
- <%= users[meeting_request.member_uuid].name %> | ||
<%= render 'shared/concept_tags', object: meeting_request %> | ||
</p> | ||
</div> | ||
<% end %> |
This file contains hidden or 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
Empty file.
This file contains hidden or 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,7 @@ | ||
<% if object.concepts.any? %> | ||
<ul class='inline'> | ||
<% object.concepts.each do |concept| %> | ||
<li><%= link_to concept.name, concept_path(concept), class: 'label concept-tag' %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wants to be in a label so you don't have to click on the checkbox itself.