-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding filter for tags #379
base: master
Are you sure you want to change the base?
Changes from all commits
ccaa53a
927a3a7
b4d0992
065e4b8
5fe0634
c15737c
88dfb5e
88063e7
c88ae18
d7d4eae
b80c7e0
973aa46
a445db4
0ff66fd
94a1cc4
078a9fe
8ea15db
d308cf2
bb9c735
5691ece
048295a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ Join our mission to create superhero coders! You can get involved by taking any | |
1. [Register for CodeMontage](http://codemontage.com/auth/github). | ||
2. [Follow us on Twitter](http://twitter.com/CodeMontage). | ||
3. Be the change you wish to see by [creating a branch](http://guides.github.com/overviews/flow) submitting a [pull request](https://github.com/CodeMontageHQ/codemontage/pulls/new) to improve the platform. *Please include a screenshot of any user interface changes with all pull requests.* | ||
4. Suggest an improvement by opening an [issue](https://github.com/CodeMontageHQ/codemontage/issues/new). | ||
(We recommend including [emojis](http://www.emoji-cheat-sheet.com) for maximum effectiveness.) | ||
4. Suggest an improvement by opening an [issue](https://github.com/CodeMontageHQ/codemontage/issues/new). Please follow [our issue template](https://github.com/CodeMontageHQ/codemontage/issues/347) and use multiple [emojis](http://www.emoji-cheat-sheet.com) for maximum effectiveness. :+1::100::wink: | ||
5. Reach out to us at [email protected]. | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
window.onload = function() { | ||
var tags = []; | ||
var href = window.location.origin + window.location.pathname; | ||
|
||
function tagLoop() { | ||
if (this.value === "all") { | ||
window.location.href = href; | ||
} else { | ||
window.location.href = href +"?tags=" + this.value; | ||
} | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary semicolon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary semicolon. |
||
|
||
tags = document.getElementsByClassName("tag_radio"); | ||
|
||
for (var i = 0; i < tags.length; i++) { | ||
tags[i].addEventListener("click", tagLoop) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing semicolon. |
||
} | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ | |
.check-in { | ||
margin-top:25px; | ||
} | ||
|
||
.top-25 { | ||
padding-top: 25px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,21 @@ h5 span.favorite { | |
.project_links { | ||
margin-bottom: 6%; | ||
} | ||
|
||
.tag_list { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Selector |
||
border-radius: 5px; | ||
color: white; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Color |
||
padding: 10px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Properties should be ordered border-radius, color, margin-bottom, overflow-x, overflow-y, padding, white-space |
||
margin-bottom: 0; | ||
overflow-x: scroll; | ||
overflow-y: hidden; | ||
white-space: nowrap; | ||
|
||
div { | ||
display: inline-block; | ||
padding-right: 10px; | ||
} | ||
} | ||
|
||
.purple { background-color: $cmPurple; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Name of variable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ignored this comment as that is how the variable is set currently in the project. |
||
.teal { background-color: $cmTeal; } |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ def create | |
end | ||
|
||
def index | ||
@events = Event.public_events.order("start_date desc") | ||
@upcoming_events = Event.upcoming_events.public_events.order("start_date desc") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [83/80] |
||
@past_events = Event.past_events.public_events.order("start_date desc") | ||
end | ||
|
||
def show | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ def index | |
else | ||
Project.featured | ||
end.with_technologies_and_causes.with_organization | ||
@tech_list, @cause_list = view_context.projects_tech_and_cause_tags_lists(@featured_projects) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [97/80] |
||
end | ||
|
||
def show | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,24 @@ def project_tags_link_list(project, type) | |
link_to tag.name, projects_path(tags: tag.name) | ||
end.join(', ').html_safe | ||
end | ||
|
||
def projects_tech_and_cause_tags_lists(projects_array) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assignment Branch Condition size for projects_tech_and_cause_tags_lists is too high. [15.26/15] |
||
technologies = [] | ||
causes = [] | ||
|
||
projects_array.each do |project| | ||
project.technologies.each do |tech| | ||
unless technologies.include? tech.name | ||
technologies << tech.name | ||
end | ||
end | ||
project.causes.each do |cause| | ||
unless causes.include? cause.name | ||
causes << cause.name | ||
end | ||
end | ||
end | ||
|
||
return technologies.sort, causes.sort | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class BetaSignup < ActiveRecord::Base | ||
belongs_to :user | ||
|
||
validates :user_id, uniqueness: true | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div id="project_requirements"> | ||
<div class="row"> | ||
<h2>Project Requirements</h2> | ||
<p>Wanting to partner with CodeMontage and become one of our <%= link_to "featured projects", projects_path %>? Here are some guidelines we look for and simple suggestions on what we consider best practices for all of our projects.</p> | ||
</div> | ||
<div class="row" id="open_source"> | ||
<h3>Open Source</h3> | ||
<p>At CodeMontage, we strive for the projects we work on to have as much transparency to the public as possible. This leads us to make open source projects a requirement for any of our featured projects.</p> | ||
<p><strong>What is considered an open source project?</strong> Open source software is software that can be freely viewed, used, changed, and shared (in modified or unmodified form) by anyone.</p> | ||
</div> | ||
<div class="row" id="leadership"> | ||
<h3>Leadership</h3> | ||
<p>The most successful open source projects have stemmed from a healthy community surrounding it. Some of these projects may have a specific foundation (e.g. jQuery, Django) that supplies the leadership to help maintain the code base. We do not require that a project have a foundation or larger organization surround the project, but merely a consistent group (or individual) who helps keep the project fresh and serves as the main point of contact.</p> | ||
</div> | ||
<div class="row" id="issue_tracker"> | ||
<h3>Issue Tracker</h3> | ||
<p>Being able to organize and track issues surrounding the development of a project is a great way to help onboard new developers. GitHub issues, Trac and other systems are acceptable forms of issue management. We require this so that our members are better able to understand how to contribute to the code base.</p> | ||
</div> | ||
<div class="row" id="up_to_date"> | ||
<h3>Up-To-Date Code Base</h3> | ||
<p>Consistent management of the code base helps a project stay fresh and well organized. If a project has not been committed to in six months or over, CodeMontage considers it a stale project and is not considered something our members can easily contribute to. However, there may be exceptions to this and project owners are welcome to connect with us at <%= mail_to "[email protected]", "[email protected]", :subject => "Connecting with CodeMontage", :target => '_blank' %> to discuss further.</p> | ||
</div> | ||
<div class="row" id="licensing"> | ||
<h3>Licensing</h3> | ||
<p>Choosing a license for your open source project is a crucial part to becoming a solid code base. It helps direct users how they are legally able to use and distribute the code in the project. We request that all projects have a license in order for us to recommend it to our members. Here is a helpful link that explains some of the more popular licensing options: <%= link_to "http://choosealicense.com/", "http://choosealicense.com/" %>.</p> | ||
<p> | ||
<em>DISCLAIMER: We are not lawyers. Please consult legal counsel regarding questions about these licensing options.</em> | ||
</p> | ||
</div> | ||
<div class="row" id="social_impact"> | ||
<h3>Social Impact</h3> | ||
<p>CodeMontage’s mission is to “improve yourself while improving the world.” Within this context, we require that our featured projects have a direct social impact on the world and help further the advancement of various aspects of the human race, the planet and social good throughout the world. It is our goal to focus on featured projects who provide this level of impact either directly or indirectly to the global community.</p> | ||
</div> | ||
<div class="row"> | ||
<h5>Questions?</h5> | ||
<p>Feel free to reach out to us at <%= mail_to "[email protected]", "[email protected]", :subject => "CodeMontage Project Requirement Questions", :target => '_blank' %>. We look forward to hearing from you!</p> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<form class="tag_list <%= color %>"> | ||
<div><input type="radio" name="tags" class="tag_radio" value="all">All</input></div> | ||
<% tag_list.each do |tech| %> | ||
<div><input type="radio" name="tags" class="tag_radio" value="<%= tech %>"><%= "#{tech}" -%></input></div> | ||
<% end %> | ||
</form> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class CreateBetaSignups < ActiveRecord::Migration | ||
def change | ||
create_table :beta_signups do |t| | ||
t.references :user | ||
t.timestamps | ||
end | ||
|
||
add_index :beta_signups, :user_id | ||
end | ||
end |
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.
'href' is defined but never used.