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/my_base/index.jsp

    r6625 r7394  
    160160    )
    161161  );
     162  newsQuery.order(Orders.desc(Hql.property("sticky")));
    162163  newsQuery.order(Orders.desc(Hql.property("newsDate")));
    163164  newsQuery.order(Orders.desc(Hql.property("id")));
     
    252253        String broadcastMessage = (String)application.getAttribute("broadcast.message");
    253254        %>
    254         <div class="item">
     255        <div class="item note sticky">
    255256          <div class="headline">
    256             <base:icon image="warning.png" />
    257257            <span class="date"><%=dateFormatter.format(new Date())%></span>
    258258            <%=HTML.encodeTags(broadcastTitle)%>
     
    362362          {
    363363            %>
    364             <div class="item">
     364            <div class="item <%=n.isSticky() ? "note sticky" :""%>">
    365365              <div class="headline">
    366366                <span class="date"><%=dateFormatter.format(n.getNewsDate())%></span>
Note: See TracChangeset for help on using the changeset viewer.