-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Moderators v1 #1903
Moderators v1 #1903
Conversation
profile = models.ForeignKey('dashboard.Profile', related_name='activities', on_delete=models.CASCADE) | ||
bounty = models.ForeignKey(Bounty, related_name='activities', on_delete=models.CASCADE, blank=True, null=True) | ||
tip = models.ForeignKey(Tip, related_name='activities', on_delete=models.CASCADE, blank=True, null=True) | ||
bounty = models.ForeignKey('dashboard.Bounty', related_name='activities', on_delete=models.CASCADE, blank=True, null=True) |
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.
E501 line too long (126 > 120 characters)
Codecov Report
@@ Coverage Diff @@
## master #1903 +/- ##
==========================================
+ Coverage 25.59% 25.92% +0.32%
==========================================
Files 129 130 +1
Lines 10470 10887 +417
Branches 1396 1484 +88
==========================================
+ Hits 2680 2822 +142
- Misses 7713 7979 +266
- Partials 77 86 +9
Continue to review full report at Codecov.
|
@@ -462,7 +463,7 @@ var refreshBounties = function(event) { | |||
var project_type = ucwords(result['project_type']) + ' • '; | |||
|
|||
result['p'] = project_type + (result['experience_level'] ? result['experience_level'] + ' • ' : ''); | |||
|
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.
❤️
set_created(act, bounty.fulfillment_accepted_on) | ||
if bounty.status == 'cancelled': | ||
act = helpers.record_bounty_activity('killed_bounty', bounty.prev_bounty, bounty) |
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.
why was this used like this in the first place ? O.o
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.
😂 Great question
@@ -226,6 +227,23 @@ def get_queryset(self): | |||
interested__profile__handle__iexact=self.request.query_params.get('interested_github_username') | |||
) | |||
|
|||
# Retrieve all mod bounties. | |||
# TODO: Should we restrict this to staff only..? Technically I don't think we're worried about that atm? |
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.
It shouldn't be a problem 👍
It's only a query after all.
@@ -84,6 +84,42 @@ | |||
</div> | |||
{% endif %} | |||
|
|||
{% if profile_id and user.profile.is_moderator or user.profile.is_staff %} | |||
<div class="col"> |
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.
Could we indent the by 1 ?
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.
I guess we can. I typically don't indent things inside of the {% if %}
blocks because the indentation carries over into the html.
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.
LGTM
* put reasons above the other two modules * gitcoinco#1854 * css: minor refactor * token approvals * fix for email not being sent * retail: added template tag matches - matches tag does a regex match - updated nav to use matches to display network status on explorer, issue, bounty - create + submit + payout pages * code refactor + clean up - removed redundant uris - reindent code - fixed uneven padding of network banner on tip page * send2: convert CRLF -> LF * isort fixes * console error, responseJSON did not exist * change name of missing image * fix for exception in bounty.additional_funding_summary_sentence() * funder stale email * linter stinter * days * Fix linting issues and docstyle all teh thingz * Fix bad variable out of scope reference in render_bounty_startwork_expired email * restructure: landing - renamed index -> funder - moved funder related templates into it's own folder - added heading to top contributors * restructure: dashboard - renamed _dashboard -> dashboard - renamed dashboard.html -> dasboard/index.html * onboard: prettified metamask wallet address * Sentry integration (gitcoinco#1846) * Sentry integration - deprecate rollbar * Imports are hard * dbl quotez * Single quotes * Fix travis * Forgot to save this file xD * Add middleware and wsgi handler * Logging adjustments for Sentry * Fix gitcoinco#1898 - Adjust ordering of mailchimp args and cast envvars to str * Merge branch 'master' into restructure * gitcoinco@dead551#diff-8d7b20d795398cf2b0e792ee8c1a165c * space in sentence * Update presskit copy (gitcoinco#1900) * Fix sentry release script revision handling * add no a token page * disabled metamask * stickler hate me * add item to menu * dashboard: remove tech stack filter * fixes press kit * add no a token page * blank * Solve conflicts * sitemap fixes * disabled metamask * stickler hate me * i have grammar OCD * bad link * Fix gitcoin logo * documentation about chain of custody * cahin of custoyddyyyyyyyyyy * Modify raven handling * Add sentry request feedback on error * Extending expiration backend code added * Some minor changes * Adds cancel button * Adds alert notifying extending of expiration * Fixes linting issues * expiration: final touches - stickler fixes - show current expiration in modal - add stopwatch icon - extra css * Fixes travis * shared.js/mutate_interest: Show a generic message on network errors. followup 3960c6 PR gitcoinco#1681 * Round up millisecond position * Moderators v1 (gitcoinco#1903) * Ref gitcoinco#1669 - Base escalation/interest statuses and handling * Moderation changes * Add faucet change to perms * No mod * Fix mig for local * Update mod handling throughout remaining views and check gh closures * Whoops * Fix some tests * Fix some pytest cases * Fix more tests * indent fix * More test changes * Add property back to tips method * Fix gitcoinco#1919 - Catch attribute error if the keywords prop isn't a string * Adjust Raven JS to no longer load async * Revert "Adjust Raven JS to no longer load async" This reverts commit 37d4584. * Fix funding/details path * Adjust github details field * gh dict * catch on gh details * Remove temporarily * Disable url dict * Disable GH funcs * Display project length in issue details page * Fix GH token usage * translation tags and clarification on lcoalhost * facebook verify * facebook verify * Revert "facebook verify" This reverts commit 50b7ebb. * Revert "facebook verify" This reverts commit 51f5e54. * Adjust saving of gh issue details * sync geth stopgap fix * Adjust default limit on bounty router * Revert "Adjust default limit on bounty router" This reverts commit a7d872c. * stopgap fix * fixes * runs make fix on master branhc * sync mail fix to make it less aggressive * Adjust yapf to no longer touch settings.py * Update precommit yapf config * fix for sync_listener * linting sync_geth * copy updates * merge migration * Adjust gh state checks * Update gh state * Updates to gh pulling... * GH Pulling adjustments * meta tags * title * no ico life * conflicts * fix for https://gitcoincore.slack.com/archives/CC24APWGN/p1533245102000397 * prod bug * prod bug * prod bug * prod bug * graphs r fun * fix for not being able to ERC20 approve tokens * fix for leaderboards * eslint * adjusts hourly rate distribution calculation criteria * Switching tree section * landing: css + refactor * lander video switcharooooooooooooO * joe dominance was busttedd * shared: updated what_is_gitcoin * added branding style to terms page * changed style of headers on terms page, moved terms.txt into terms.html, added blocktrans tag * Confirming Auto-translation (gitcoinco#1916) * Update makefile with build/push/login and add OCI compliant labels * terms: moved to internal css + mt-4 -> mt-5 * Adjust sentry to use split projects * Fix config * Adjust fe sentry template * Sentry adjustments * livestream 8/3 * Sentry adjustments * livestream 8/3 (gitcoinco#1930) * Show Just 1 Alert Banner for ERC20 Token Fixes gitcoinco#1566 * allow trailing slah for profile (gitcoinco#1931) * Improve tip slack notification (gitcoinco#1929) * Improve tip slack notification * Remove title var and simply check tip.github_url * Add new lines * Adjust sentry raven JS * Adjust sentry raven JS * Revert profile url change * Revert "Adjust sentry raven JS" This reverts commit 5432bc4. * Revert "Adjust sentry raven JS" This reverts commit 25e9987. * Sentry adjustments * Final sentry js adjustments! * tip receive is eth * nonce value * bounty: restructure pages * Fix gitcoinco#1949 - Adjust getattr for profile * prod debugging; dupe emails * prod debugging of dupe emails * prod debugging of dupe emails * remove dupe to_email * dupe email fix * dupe email fix * dupe email fix * reverts debug code * fix for bad preferred profile addresses * fix for https://sentry.gitcoin.co/gitcoin/gitcoin-prod-frontend/issues/278/ * http 404 on hidden prfiles * SEO fixes, linting * content type for robots.txt * SEO stuff * sync_geth latest disabler * Fix isort / travis * what_is_gitcoin : revert to old design (gitcoinco#1957) * fix gitcoinco#1921 * Fix gitcoinco#1934 - Resolve funded total in profile (gitcoinco#1935) * fix for https://sentry.gitcoin.co/gitcoin/gitcoin-prod-backend/issues/321/?referrer=slack * support for https://sentry.gitcoin.co/gitcoin/gitcoin-prod-backend/issues/320/?referrer=slack * disqus url now canonical * funder stale args * very small copy change * smarter funder stale emails * fix for ipfs hashes not existing * fix for being redirected to old bounty id upon submission * copy updates * handler for not sending funder stale emails if n email * puts the right network linkn on the web3 waiter * metamask reloader * explorer: ensure results from latest api call are served to the user (gitcoinco#1941) * explorer: abort pending request for fetchingBounties * added review feedback * Upgrade django to 2.1, modify field defaults, and address deprecations (gitcoinco#1915) * Upgrade django to 2.1 and address deprecations * Remove commented out imports * fix: sticker issue * Update reqs * Remove unused import * Fix gitcoinco#1972 - Strip characters from stdbounties_id and check isdigit * replaced misspelled 'deonomination' with 'denomination' throughout the codebase (gitcoinco#1974) * dashboard: uri cleanup (gitcoinco#1971) * img: removed unused images * Resolve outdated deps in package-lock.json * Upgrade FE npm deps * Upgrade FE npm deps * Pin raven * starts to track gas guzzlers, for later inclusion in the gitcoin gas station * Error: insufficient funds for gas * price + value * gas guzzlers * linter * gas guzzlers * fix for slack not showing UP * newsletter 8/10 * copy updates * does tip receive math in BigNumber, bc JS rounding issues * share link not edit link * Update profile check to getattr * fix for https://gitcoincore.slack.com/archives/CAXQ7PT60/p1533912000000126 * satisfy linter * press * Split create_new_bounty kwargs building and check if once (gitcoinco#1892) * Split create_new_bounty kwargs building and check if once * Update to_dict to use model_to_dict form helper * Fix import - whoops * Adjust to dict handling via supermodel method * keep an eye on unsubscribes in preferences * keep an eye on unsubscribes in preferences * fixes label on gas guzzler page, and adds an admin view for vizuailzations * Minor tweaks to action plan textarea (gitcoinco#1856) * Clear example action plan when the textarea is focused * Fix minor typo * hack: trailing slash for profile (gitcoinco#1937) * start work : update placeholder * added feedback
Description
The goal of this PR is to introduce the base moderator functionality for non-staff moderators.
Checklist
Affected core subsystem(s)
moderators, bounties
Testing
Locally and on staging