Skip to content

Commit

Permalink
Hide emails in production site.
Browse files Browse the repository at this point in the history
  • Loading branch information
fatlotus committed Jan 11, 2016
1 parent bcdc6c1 commit 6b2fc5a
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 72 deletions.
10 changes: 4 additions & 6 deletions caravel/templates/listing_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
{% 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>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,13 +23,13 @@ <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="mailto:{{ 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
1 change: 1 addition & 0 deletions caravel/tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ 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'Alumni/BSD.*?any time\. ', '', markup)
return markup.strip()

def extract_photos(self, markup):
Expand Down
Loading

0 comments on commit 6b2fc5a

Please sign in to comment.