Skip to content
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

Temporarily hide emails #214

Merged
merged 1 commit into from
Jan 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions caravel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
CsrfProtect(app)

# Imported for side effects:
import caravel.storage.config
import caravel.controllers.listings
import caravel.controllers.api
import caravel.controllers.moderation
Expand Down
11 changes: 5 additions & 6 deletions caravel/templates/listing_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
{% if form.principal %}
{{ wtf.form_field(form.principal) }}
{% endif %}
<div class="alert alert-warning" role="alert">
BSD/Medicine/Medical School affiliates: if you are unable to sign
in with your CNetID, please enter your email in the box. Your
listing might not be posted immediately. We reserve the right to
remove listings at any time.
</div>
<p class="alert alert-warning" role="alert">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have not reverted to the correct master?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is. The <p> is more semantic than a <div>, but it should show up in the same manner.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oops. I missed the CSS class there. Sure.

Alumni/BSD/Medicine/Medical School affiliates: if you are unable
to sign in with your CNetID, please enter your email in the box.
Your listing might not be posted immediately. We reserve the right
to remove listings at any time.</p>
{{ wtf.form_field(form.categories) }}
{{ wtf.form_field(form.price) }}
{{ wtf.form_field(form.body) }}
Expand Down
6 changes: 3 additions & 3 deletions caravel/templates/listings/fullpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ <h2>{{ listing.title }}</h2>
<span class="label label-default">{{ category }}</span>
{% endfor %}
</p>
<p>Posted <strong>{{ listing.posted_at|as_duration }}</strong>
by {% if current_user %}
<p>Posted <strong>{{ listing.posted_at|as_duration }}</strong>.
{# by {% if current_user %}
<a href="{{ url_for('search_listings',
q=listing.principal.email) }}">
{{ listing.principal.email }}</a>
{%- else -%}
[address hidden] (<a href="{{ login_url() }}">sign in</a> to view)
{%- endif -%}.
{%- endif -%}. #}
Price: <strong>{{ '${:,.2f}'.format(listing.price) }}</strong>
</p>
{% if is_admin %}
Expand Down
4 changes: 2 additions & 2 deletions caravel/templates/listings/thumbnail.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ <h3>
{% for category in listing.categories %}
<span class="label label-default">{{ category }}</span>
{% endfor %}<br/>
{% if current_user %}
{# }{% if current_user %}
<span class="label label-primary">{{ listing.principal.email }}</span>
{% endif %}
{% endif %} #}
<span class="label label-info">{{
listing.posted_at|as_duration }}</span>
</p>
Expand Down
3 changes: 2 additions & 1 deletion caravel/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def clean(self, markup):
markup = re.sub(r'Marketplace is.*lists.uchicago.edu\. ', '', markup)
markup = re.sub(r'(^.*UChicago Marketplace)|(&#169;.*$)', '', markup)
markup = re.sub(r'Please .* Update to Marketplace \. ', '', markup)
markup = re.sub(r'tip: .*? listings ', '', markup)
markup = re.sub(r'tip: .*? listings ', '', markup)
markup = re.sub(r'Alumni/BSD.*?any time\. ', '', markup)
return markup.strip()

def extract_photos(self, markup):
Expand Down
Loading