diff --git a/README.md b/README.md index 59b3d570..e858e46c 100644 --- a/README.md +++ b/README.md @@ -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 hello@codemontage.com. diff --git a/app/assets/javascripts/projects.js b/app/assets/javascripts/projects.js new file mode 100644 index 00000000..8c46d7ad --- /dev/null +++ b/app/assets/javascripts/projects.js @@ -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; + } + }; + + tags = document.getElementsByClassName("tag_radio"); + + for (var i = 0; i < tags.length; i++) { + tags[i].addEventListener("click", tagLoop) + } +}; + \ No newline at end of file diff --git a/app/assets/stylesheets/events.css.scss b/app/assets/stylesheets/events.css.scss index 7be64c15..acfffea3 100644 --- a/app/assets/stylesheets/events.css.scss +++ b/app/assets/stylesheets/events.css.scss @@ -7,3 +7,7 @@ .check-in { margin-top:25px; } + +.top-25 { + padding-top: 25px; +} diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 06253ca6..d8b19ba8 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -27,3 +27,21 @@ h5 span.favorite { .project_links { margin-bottom: 6%; } + +.tag_list { + border-radius: 5px; + color: white; + padding: 10px; + margin-bottom: 0; + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; + + div { + display: inline-block; + padding-right: 10px; + } +} + +.purple { background-color: $cmPurple; } +.teal { background-color: $cmTeal; } diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 27fff25c..a1f72b28 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -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") + @past_events = Event.past_events.public_events.order("start_date desc") end def show diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 062edb06..62894885 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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) end def show diff --git a/app/helpers/project_controller_helper.rb b/app/helpers/project_controller_helper.rb index da8e49df..cc302fa8 100644 --- a/app/helpers/project_controller_helper.rb +++ b/app/helpers/project_controller_helper.rb @@ -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) + 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 diff --git a/app/models/beta_signup.rb b/app/models/beta_signup.rb new file mode 100644 index 00000000..554dcd48 --- /dev/null +++ b/app/models/beta_signup.rb @@ -0,0 +1,5 @@ +class BetaSignup < ActiveRecord::Base + belongs_to :user + + validates :user_id, uniqueness: true +end diff --git a/app/models/event.rb b/app/models/event.rb index 915bfde2..c7e907d8 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -27,6 +27,7 @@ class Event < ActiveRecord::Base friendly_id :name, use: :slugged scope :upcoming_events, -> { where("end_date >= ?", Time.now) } + scope :past_events, -> { where("end_date < ?", Time.now) } scope :public_events, -> { where(is_public: true) } def self.featured @@ -114,6 +115,14 @@ def fetch_engagement_stats stats end + def upcoming? + true if end_date >= Time.now + end + + def past? + true if end_date < Time.now + end + private def delete_logo diff --git a/app/models/user.rb b/app/models/user.rb index 1a31b28e..4e32cc00 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -19,6 +19,7 @@ class User < ActiveRecord::Base has_many :services has_one :profile, class_name: 'UserProfile' + has_one :beta_signup delegate :gravatar_email, :headline, :is_coder, :name, :represents_org, :represents_team, :cause_list, :technology_list, :email_news, :email_training, to: :profile validates_presence_of :password, on: :create # will only run on account creation diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 44561113..2db8eccb 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -2,16 +2,27 @@
Join us online or in-person at these upcoming events to build open source and change the world:
Oops! We can't seem to find any events. <%= link_to "Jump into a project", projects_path %>, or <%= link_to "reach out to an organization", organizations_path %> directly.
@@ -23,3 +34,4 @@ <%= render "check_in_prompt" %> <% end %>Join us <%= @event.start_date.strftime("%B %d, %Y") %> for the
-Join us <%= @event.start_date.strftime("%B %d, %Y") %> for the
+<%= @event.start_date.strftime("%B %d, %Y") %>
+ <% end %>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.
+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.
+What is considered an open source project? Open source software is software that can be freely viewed, used, changed, and shared (in modified or unmodified form) by anyone.
+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.
+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.
+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 "projects@codemontage.com", "projects@codemontage.com", :subject => "Connecting with CodeMontage", :target => '_blank' %> to discuss further.
+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/" %>.
++ DISCLAIMER: We are not lawyers. Please consult legal counsel regarding questions about these licensing options. +
+Feel free to reach out to us at <%= mail_to "projects@codemontage.com", "projects@codemontage.com", :subject => "CodeMontage Project Requirement Questions", :target => '_blank' %>. We look forward to hearing from you!
+
Social Impact
+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.
+