Ignore:
Timestamp:
Jun 9, 2017, 2:23:58 PM (5 years ago)
Author:
Nicklas Nordborg
Message:

References #2085: Sticky news

Various places where news are displyed have been updated to sort the news with the "sticky" flag set first. The sticky news item are displayed with a different background color and a "paperclip" icon.

The login page has also been modified to show all sticky news even if there are more than 10 items which was the limit before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/info/news.jsp

    r6177 r7394  
    8484      {
    8585        %>
    86         <div class="item">
     86        <div class="item note sticky">
    8787          <div class="headline">
    88             <base:icon image="warning.png" />
    8988            <a name="broadcast"></a>
    9089            <span class="date"><%=dateFormatter.format(new Date())%></span>
     
    9695      }
    9796      ItemQuery<News> query = News.getQuery();
     97      query.order(Orders.desc(Hql.property("sticky")));
    9898      query.order(Orders.desc(Hql.property("newsDate")));
    9999      query.order(Orders.desc(Hql.property("id")));
     
    103103      {
    104104        %>
    105         <div class="item">
     105        <div class="item <%=n.isSticky() ? "note sticky" : ""%>">
    106106          <div class="headline">
    107107            <a name="<%=n.getId() + "-" + n.getVersion()%>"></a>
Note: See TracChangeset for help on using the changeset viewer.