-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add a report user button #1220
Open
MartinDelille
wants to merge
5
commits into
master
Choose a base branch
from
add-signal-user-button
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
Add a report user button #1220
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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 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 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 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,101 @@ | ||
from liberapay.exceptions import UserDoesntAcceptTips | ||
from liberapay.utils import get_participant | ||
|
||
[---] | ||
participant = get_participant(state, restrict=False) | ||
if participant.goal == -1: | ||
raise response.error(403, UserDoesntAcceptTips(participant.username)) | ||
|
||
full_title = _("Signal {0}", participant.username) | ||
|
||
[---] text/html | ||
% extends "templates/profile-base.html" | ||
|
||
% from 'templates/elsewhere.html' import account_elsewhere with context | ||
|
||
% block head_early | ||
{{ super() }} | ||
<meta property="og:description" | ||
content="{{ _('Support {username}\'s work with a recurrent donation.', | ||
username=participant.username) }}"> | ||
% endblock | ||
|
||
{% block heading %}{% endblock %} | ||
|
||
% block content | ||
<div class="row"> | ||
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> | ||
<h2>{{ _("Signal {0}", ('<a href="/{0}">{0}</a>'|safe).format(participant.username)) }}</h2> | ||
|
||
% if not participant.hide_receiving | ||
% set goal, receiving = participant.goal, participant.receiving | ||
% if goal | ||
% if receiving | ||
<p>{{ _( | ||
"{0} currently receives {1} per week, they need your help to reach " | ||
"their funding goal ({2} per week)." | ||
, participant.username, receiving, goal | ||
) }}</p> | ||
% else | ||
<p>{{ _( | ||
"{0}'s goal is to receive {1} per week." | ||
, participant.username, goal | ||
) }} {{ _("Be the first to contribute!") }}</p> | ||
% endif | ||
% else | ||
<p>{{ _( | ||
"{0} currently receives {1} per week." | ||
, participant.username, receiving | ||
) }}</p> | ||
% endif | ||
% endif | ||
|
||
<br> | ||
|
||
% set e_accounts = participant.get_accounts_elsewhere() | ||
% if e_accounts | ||
<h3>{{ _("Recipient Identity") }}</h3> | ||
<p>{{ _( | ||
"We have confirmed through an automated verification process that " | ||
"{0} has control of the following accounts on other platforms:", | ||
participant.username | ||
) }}</p> | ||
% for platform in website.platforms if platform.name in e_accounts | ||
{{ account_elsewhere(platform, e_accounts, None) }} | ||
% endfor | ||
<br> | ||
% endif | ||
|
||
% block form | ||
<p>{{ _( | ||
"Please add a short description why you want to report this user:" | ||
) }}</p> | ||
|
||
<form action="" method="POST" class="signal"> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" /> | ||
|
||
<div class="form-group"> | ||
<textarea name="signal" rows="15" | ||
class="form-control signal vertical-resize" | ||
placeholder={{ _("Say something.") }} | ||
data-confirm-discard="{{ confirm_discard }}" | ||
></textarea> | ||
<p class="help-block pull-right">{{ _("Markdown supported.") }} | ||
<a href="https://daringfireball.net/projects/markdown/basics" | ||
target="_blank" rel="noopener noreferrer">{{ _("What is Markdown?") }}</a> | ||
</p> | ||
</div> | ||
|
||
<button class="signal btn btn-success" name="signal" value="true">{{ _("Signal") }}</button> | ||
% endblock | ||
|
||
<h3>{{ _("Frequently Asked Questions") }}</h3> | ||
|
||
<h4>{{ _("What happen when I signal a user") }}</h4> | ||
<p>{{ _( | ||
"The profil will be review by the moderator. " | ||
) }}</p> | ||
|
||
</div> | ||
</div> | ||
% endblock |
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.
"The profile will be reviewed by a moderator."