mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 07:19:25 -05:00
Gold goal: allow employees to see actual goals
This commit is contained in:
committed by
Neil Williams
parent
c4e3c9fa35
commit
e97767715d
@@ -4294,6 +4294,9 @@ class Goldvertisement(Templated):
|
||||
revenue_goal_yesterday) * 100)
|
||||
self.hours_paid = ServerSecondsBar.current_value_of_month()
|
||||
self.time_left_today = timeuntil(end_time, precision=60)
|
||||
if c.user.employee:
|
||||
self.goal_today = revenue_goal / 100.0
|
||||
self.goal_yesterday = revenue_goal_yesterday / 100.0
|
||||
Templated.__init__(self)
|
||||
|
||||
class LinkCommentsSettings(Templated):
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
|
||||
<div class="goldvertisement">
|
||||
<div class="inner">
|
||||
<h2>${_("daily reddit gold goal")}</h2>
|
||||
<h2
|
||||
% if hasattr(thing, "goal_today"):
|
||||
title="Goal = $${'%0.2f' % thing.goal_today}"
|
||||
% endif
|
||||
>${_("daily reddit gold goal")}</h2>
|
||||
|
||||
<div class="progress">
|
||||
<p>${format_percent(thing.percent_filled / 100.0, locale=c.locale)}</p>
|
||||
@@ -57,7 +61,11 @@
|
||||
(${thing.time_left_today} from now).</p>
|
||||
|
||||
<div class="history">
|
||||
<p>${_("Yesterday's reddit gold goal")}</p>
|
||||
<p
|
||||
% if hasattr(thing, "goal_yesterday"):
|
||||
title="Goal = $${'%0.2f' % thing.goal_yesterday}"
|
||||
% endif
|
||||
>${_("Yesterday's reddit gold goal")}</p>
|
||||
|
||||
<div class="progress">
|
||||
<p>${format_percent(thing.percent_filled_yesterday / 100.0, locale=c.locale)}</p>
|
||||
|
||||
Reference in New Issue
Block a user