myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2023] branches/invitation_throttling/app/views/m


From: noreply
Subject: [myexperiment-hackers] [2023] branches/invitation_throttling/app/views/messages/new.rhtml: Throttling.
Date: Mon, 1 Dec 2008 12:56:59 -0500 (EST)

Revision
2023
Author
alekses6
Date
2008-12-01 12:56:59 -0500 (Mon, 01 Dec 2008)

Log Message

Throttling. New message screen displays a notice that only one more internal message is allowed until certain date.

Modified Paths

Diff

Modified: branches/invitation_throttling/app/views/messages/new.rhtml (2022 => 2023)


--- branches/invitation_throttling/app/views/messages/new.rhtml	2008-12-01 17:48:37 UTC (rev 2022)
+++ branches/invitation_throttling/app/views/messages/new.rhtml	2008-12-01 17:56:59 UTC (rev 2023)
@@ -1,5 +1,14 @@
 <% @message.to = params[:user_id] if params[:user_id] -%>
 
+<% remaining_allowance, allowance_finishes = ActivityLimit.remaining_allowance(current_user, "internal_message") -%>
+<% if remaining_allowance == 1 -%>
+	<p class="box_currentuser_specific" style="font-weight: bold; text-align: center;">
+		Please note that you can only send one more internal message 
+		<%= allowance_finishes ? "until #{allowance_finishes.strftime("%H:%M on %d/%m/%Y")}" : "; your allowance will not be reset" -%>. 
+	</p>
+<% end -%>
+
+
 <h1><%= params[:reply_id] ? h("Reply to Message") : h("New Message") %></h1>
 
 <%= error_messages_for :message %>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]