root/trunk/app/views/messages/sentmessages.ctp

Revision 827, 1.7 kB (checked in by aarkerio, 7 weeks ago)

Models extendend

Line 
1<?php
2// die(debug($data));
3echo $html->link($html->image('admin/compose_on.gif', array("alt"=>"Compose New Message", "title"=>"Compose New Message")),
4'/messages/compose', null, false, false) . '  ';
5
6$th = array('Subject', __('To', true), __('Date', true));
7
8e('<table style="width:100%;border:1px dotted orange;padding:3px;">');
9
10echo $html->tableHeaders($th, array('style'=>'text-align:center'));
11
12foreach ($data as $val):
13   $tr = array(
14        $html->link($val['Message']['title'], '/messages/display/'.$val['Message']['id']),
15        $html->link($val['User']['username'], '/vclassrooms/aboutme/'.$val['User']['username']),
16        $val['Message']['created'] . "\n"
17        );
18       
19    echo $html->tableCells($tr, array("class"=>"altRow", "onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='altRow'"),
20                                array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'"));
21endforeach;
22?>
23</table>
24<script language="Javascript" type="text/javascript">
25    //
26    // Should really check the browser to stop this whining ...
27    //
28    function select_switch(status)
29    {
30        for (i = 0; i < document.privmsg_list.length; i++)
31        {
32            document.privmsg_list.elements[i].checked = status;
33        }
34    }
35   
36    function chkList()
37    {   
38        var j = 0;
39        for (i = 0; i < document.privmsg_list.length; i++)
40        {
41            if (document.privmsg_list.elements[i].checked == true)
42            {
43                j++;
44            }
45        }
46        //alert('Inside '+ j);
47       
48        if (j == 0 )
49        {
50            alert('You must select at least one message');
51            return false;
52        }
53       
54        return true;
55    }
56</script>
Note: See TracBrowser for help on using the browser.