Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    The UI has no business knowing the business rule about what was published when -- Alright, but even Stack Exchange has such UI rules. For example, the "delete" link doesn't appear for other users on closed questions until two days have elapsed, and the Migration option is disabled after 60 days. Commented Jun 2, 2015 at 14:51
  • I clarified the question based on this answer: some controls are going to be removed, and others are will be added, depending on the date. Commented Jun 2, 2015 at 14:53
  • 13
    @RobertHarvey, but how is it programmed in the view? Is it something like if (showDelete) { <button>delete</button> } or if ((post.date - today).days > 2) { <button>delete</button> }? Commented Jun 2, 2015 at 17:49
  • @ArturoTorresSánchez: The former - the whole idea is to put the business logic (such as date calcluation) into the server. Anyway, this would make a good question of its own :-). Commented Jun 11, 2015 at 12:10