Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Aug 19, 2020
2 parents 72d7998 + 808b6d3 commit d97a45a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.DS_Store*
*.pyc
chatdata/config/*
chatconfig/config.json
chatdata/root.html
static/*
sftp-config.json
Expand Down
6 changes: 5 additions & 1 deletion app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@
path('hackathon/<str:hackathon>/new', dashboard.views.new_hackathon_bounty, name='new_hackathon_bounty2'),
path('hackathon/<str:hackathon>/', dashboard.views.hackathon, name='hackathon'),
path('hackathon/dashboard/<str:hackathon>', dashboard.views.dashboard_sponsors, name='sponsors-dashboard'),
path('hackathon/dashboard/<str:hackathon>/<str:panel>', dashboard.views.dashboard_sponsors, name='sponsors-dashboard'),
path(
'hackathon/dashboard/<str:hackathon>/<str:panel>',
dashboard.views.dashboard_sponsors,
name='sponsors-dashboard'
),
path('hackathon/<str:hackathon>', dashboard.views.hackathon, name='hackathon2'),
path('hackathon/<str:hackathon>/onboard/', dashboard.views.hackathon_onboard, name='hackathon_onboard2'),
path('hackathon/<str:hackathon>/<str:panel>/', dashboard.views.hackathon, name='hackathon'),
Expand Down
14 changes: 13 additions & 1 deletion app/assets/v2/js/pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ var get_search_URI = function(offset, order) {
values.forEach(function(_value) {
var _key;

if (_value === 'createdByMe') {
if (_value === 'createdByMe' || _value === 'stale') {
_key = 'bounty_owner_github_username';
_value = document.contxt.github_handle;
} else if (_value === 'startedByMe') {
Expand Down Expand Up @@ -529,6 +529,18 @@ var refreshBounties = function(event, offset, append) {
}

explorer.bounties_request = $.get(bountiesURI, function(results, x) {

// Filter results by open bounties created more than 3 days ago
if ($('input[name="bounty_filter"]:checked').val().toString() === 'stale') {
results = results.filter(bounty => {
const now = new Date();
const created = new Date(bounty.web3_created);
const daysAgo = new Date(now.setDate(now.getDate() - 3));

return daysAgo > created && bounty.status === 'open';
});
}

results = sanitizeAPIResults(results);

if (results.length === 0 && !append) {
Expand Down
75 changes: 44 additions & 31 deletions app/dashboard/templates/dashboard/sidebar_search.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{% comment %}
Copyright (C) 2020 Gitcoin Core
Copyright (C) 2020 Gitcoin Core

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see
<http: //www.gnu.org/licenses />.
{% endcomment %}
{% load i18n static %}
<div class="sidebar_search font-body">
Expand Down Expand Up @@ -43,7 +44,8 @@
<div class="col">
<div class="col-12 subheading">
{% trans "Status" %}
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true" data-container="body" data-content='{% include "shared/status_tooltip.html" %}'></i>
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true"
data-container="body" data-content='{% include "shared/status_tooltip.html" %}'></i>
</div>
<div class="col-12 options">
<div class="form__radio option">
Expand Down Expand Up @@ -86,7 +88,8 @@
<div class="col my-1 mt-3">
<div class="col-12 subheading">
{% trans "Tribe name" %}
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true" data-container="body" data-content='{% include "shared/organization_tooltip.html" %}'></i>
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true"
data-container="body" data-content='{% include "shared/organization_tooltip.html" %}'></i>
</div>
<div class="col-12">
<div class="mb-2">
Expand Down Expand Up @@ -125,7 +128,8 @@
<div class="col">
<div class="col-12 subheading">
{% trans "Project Type" %}
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true" data-container="body" data-content='{% include "shared/project_type_tooltip.html" %}'></i>
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true"
data-container="body" data-content='{% include "shared/project_type_tooltip.html" %}'></i>
</div>
<div class="col-12 options">
<div class="checkbox_container">
Expand Down Expand Up @@ -175,23 +179,28 @@
<div class="col-12 subheading">{% trans "My Bounties" %}</div>
<div class="col-12 options">
<div class="form__radio option">
<input name="bounty_filter" id="createdByMe" type="radio" value="createdByMe" val-ui='Created'/>
<input name="bounty_filter" id="createdByMe" type="radio" value="createdByMe" val-ui='Created' />
<label class="filter-label" for=createdByMe>{% trans "Created By Me" %}</label>
</div>
<div class="form__radio option">
<input name="bounty_filter" id="startedByMe" type="radio" value="startedByMe" val-ui='Started'/>
<input name="bounty_filter" id="startedByMe" type="radio" value="startedByMe" val-ui='Started' />
<label class="filter-label" for=startedByMe>{% trans "Started By Me" %}</label>
</div>
<div class="form__radio option">
<input name="bounty_filter" id="FulfilledByMe" type="radio" value="fulfilledByMe" val-ui='Fulfilled'/>
<input name="bounty_filter" id="FulfilledByMe" type="radio" value="fulfilledByMe" val-ui='Fulfilled' />
<label class="filter-label" for=FulfilledByMe>{% trans "Fulfilled By Me" %}</label>
</div>
<div class="form__radio option">
<input name="bounty_filter" id="ReservedForMe" type="radio" value="reservedForMe" val-ui='Reserved For Me'/>
<input name="bounty_filter" id="ReservedForMe" type="radio" value="reservedForMe"
val-ui='Reserved For Me' />
<label class="filter-label" for=ReservedForMe>{% trans "Reserved For Me" %}</label>
</div>
<div class="form__radio option">
<input name="bounty_filter" id="all_bounty" type="radio" value="any" checked/>
<input name="bounty_filter" id="stale" type="radio" value="stale" val-ui='Not Picked Up 3+ Days' />
<label class="filter-label" for=stale>{% trans "Not Picked Up 3+ Days" %}</label>
</div>
<div class="form__radio option">
<input name="bounty_filter" id="all_bounty" type="radio" value="any" checked />
<label class="filter-label" for=all_bounty>{% trans "All" %}</label>
</div>
</div>
Expand All @@ -203,31 +212,33 @@
<div class="col-12 subheading">{% trans "Moderation" %}</div>
<div class="col-12 options">
<div class="form__radio option">
<input name="moderation_filter" id="escalated" type="radio" value="escalated" val-ui="Escalated"/>
<input name="moderation_filter" id="escalated" type="radio" value="escalated" val-ui="Escalated" />
<label class="filter-label" for=escalated>{% trans "Escalated" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="warned" type="radio" value="warned" val-ui="Warned"/>
<input name="moderation_filter" id="warned" type="radio" value="warned" val-ui="Warned" />
<label class="filter-label" for=warned>{% trans "Warned" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="hidden" type="radio" value="hidden" val-ui="Hidden"/>
<input name="moderation_filter" id="hidden" type="radio" value="hidden" val-ui="Hidden" />
<label class="filter-label" for=hidden>{% trans "Hidden" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="not_started" type="radio" value="not_started" val-ui="Not Started"/>
<input name="moderation_filter" id="not_started" type="radio" value="not_started" val-ui="Not Started" />
<label class="filter-label" for=not_started>{% trans "Not Picked Up 3+ Days" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="closed_on_github" type="radio" value="closed_on_github" val-ui="Closed On Github"/>
<input name="moderation_filter" id="closed_on_github" type="radio" value="closed_on_github"
val-ui="Closed On Github" />
<label class="filter-label" for=closed_on_github>{% trans "Closed On Github" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="needs_review" type="radio" value="needs_review" val-ui="Needs Review"/>
<input name="moderation_filter" id="needs_review" type="radio" value="needs_review"
val-ui="Needs Review" />
<label class="filter-label" for=needs_review>{% trans "Needs Review" %}</label>
</div>
<div class="form__radio option">
<input name="moderation_filter" id="no_moderation" type="radio" value="" checked/>
<input name="moderation_filter" id="no_moderation" type="radio" value="" checked />
<label class="filter-label" for=no_moderation>{% trans "No Moderation" %}</label>
</div>
</div>
Expand All @@ -237,11 +248,13 @@
<div class="col">
<div class="col-12 subheading">
{% trans "Permissions" %}
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true" data-container="body" data-content='{% include "shared/permissions_type_tooltip.html" %}'></i>
<i class="fas fa-question-circle ml-2" data-toggle="popover" data-trigger="hover" data-html="true"
data-container="body" data-content='{% include "shared/permissions_type_tooltip.html" %}'></i>
</div>
<div class="col-12 options">
<div class="checkbox_container">
<input name="permission_type" id="permissionless" type="checkbox" value="permissionless" val-ui='Permissionless' />
<input name="permission_type" id="permissionless" type="checkbox" value="permissionless"
val-ui='Permissionless' />
<span class="checkbox"></span>
<div class="filter-label">
<label for=permissionless>{% trans "Permissionless" %}</label>
Expand Down Expand Up @@ -275,14 +288,14 @@
</div>
</div>
<div class="checkbox_container">
<input name="project_length" id="weeks" type="checkbox" value="weeks" val-ui='Weeks-Long' />
<input name="project_length" id="weeks" type="checkbox" value="weeks" val-ui='Weeks-Long' />
<span class="checkbox"></span>
<div class="filter-label">
<label for=weeks>{% trans "Weeks" %}</label>
</div>
</div>
<div class="checkbox_container">
<input name="project_length" id="months" type="checkbox" value="months" val-ui='Months-Long' />
<input name="project_length" id="months" type="checkbox" value="months" val-ui='Months-Long' />
<span class="checkbox"></span>
<div class="filter-label">
<label for=months>{% trans "Months" %}</label>
Expand Down Expand Up @@ -356,4 +369,4 @@
<div>
<p id="clear">{% trans "Reset Filters" %}</p>
</div>
</div>
</div>
35 changes: 29 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,40 @@

Gitcoin Grows Open Source. Learn more at [https://gitcoin.co](https://gitcoin.co)


<a href="https://gitcoin.co/explorer?q=gitcoinco">
<img src="https://gitcoin.co/funding/embed?repo=https://github.com/gitcoinco/web&badge=1&maxAge=60" alt="Open bounties widget">
</a>

# web repo

[![Build Status](https://travis-ci.org/gitcoinco/web.svg?branch=master)](https://travis-ci.org/gitcoinco/web)
[![codecov](https://codecov.io/gh/gitcoinco/web/branch/master/graph/badge.svg)](https://codecov.io/gh/gitcoinco/web)
<p align="center">

<a href="https://twitter.com/gitcoin">
<img src="https://img.shields.io/twitter/follow/gitcoin?style=social" alt="Follow @gitcoin" />
</a>
<a href="https://codecov.io/gh/gitcoinco/web">
<img src="https://codecov.io/gh/gitcoinco/web/branch/master/graph/badge.svg" />
</a>
<a href="https://travis-ci.org/gitcoinco/web">
<img src="https://travis-ci.org/gitcoinco/web.svg?branch=master" />
</a>
<a href="https://github.com/3scava1i3r/web/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/gitcoinco/web">
</a>
<a href="https://github.com/gitcoinco/web/graphs/contributors">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/gitcoinco/web">
</a>
<a href="">
<img alt="GitHub" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
</a>
<a href="">
<img alt="GitHub top language" src="https://img.shields.io/github/languages/top/gitcoinco/web">
<a/>
<a href="https://www.reddit.com/r/gitcoincommunity/">
<img alt="Subreddit subscribers" src="https://img.shields.io/reddit/subreddit-subscribers/gitcoincommunity?style=social">
</a>

</p>

This is the website that is live at [gitcoin.co](https://gitcoin.co)
```master``` branch - staging
Expand Down Expand Up @@ -211,6 +237,3 @@ Note:

- [Code - GNU AFFERO GENERAL PUBLIC LICENSE](../LICENSE)
- [Creative assets -- Attribution-NonCommercial-NoDerivatives 4.0 International](../app/assets/LICENSE.txt)

<!-- Google Analytics -->
<img src='https://ga-beacon.appspot.com/UA-102304388-1/gitcoinco/web' style='width:1px; height:1px;' >

0 comments on commit d97a45a

Please sign in to comment.