Ignore:
Timestamp:
07/15/10 14:51:39 (22 months ago)
Author:
dart
Message:

LoReality?:
o AJAX work for message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loreality/loreality/templates/base/index.html

    r2111 r2112  
    1212${ h.stylesheet_link( '/style.css') } 
    1313${ h.javascript_link( '/dojo/dojo/dojo.js', djConfig="parseOnLoad: true") } 
     14 <script type="text/javascript"> 
     15     // Load Dojo's code relating to the Button widget 
     16     dojo.require("dijit.form.Button"); 
     17     dojo.require("dojo.fx"); 
     18     dojo.require("dojo.html"); 
     19  </script> 
     20 
    1421    <title>${self.title()}</title> 
    1522    ${self.head()} 
     
    2431                % if h.auth.authorized(h.auth.is_valid_user) and not (request.urlvars['controller'] == 'account' and request.urlvars['action'] == 'signout'): 
    2532            <div id="message_box"> 
    26                 You have <a href="${h.url_for(controller='messager', action='index')}">${h.msg.nb_messages(request.environ['REMOTE_USER'])} new messages</a>. 
     33                You have <a href="${h.url_for(controller='messager', action='index')}">${self.messages_unread()} new messages</a>. 
    2734            </div> 
    2835                % endif 
     
    6370    % endif 
    6471</%def> 
     72 
     73<%def name="messages_unread()"> 
     74<span id="nb_msg_unread">${h.msg.nb_messages(request.environ['REMOTE_USER'])}</span> 
     75</%def> 
Note: See TracChangeset for help on using the changeset viewer.