list_messages.html 3.11 KB
Newer Older
joansp's avatar
joansp committed
1
2
3

<div class="panel-body">
    <div class="col-lg-12">
joansp's avatar
joansp committed
4
5
6
        <div ng-show="pingbe_fail" class="alert alert-danger" ng-cloak>
            <strong>Error!</strong> Backend no available!
        </div>
joansp's avatar
joansp committed
7
8
9
10
11
12
13
14
15
16
17
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Subject</th>

                    <th>Date</th>

                    <th>Actions</th>
                    
                </tr>
            </thead>
joansp's avatar
joansp committed
18
19
            <tbody >
                <tr ng-repeat="message in list_message">
joansp's avatar
joansp committed
20
21
22
23
24
25
26
27
                    <td><div ng-show="{{message.date_read == null}}"><i class="fa fa-circle" aria-hidden="true" style="color:#33ccff; margin:0 5px 0 0; size: 0.5em;"></i><b>{{message.subject}}</b></div>
                        <div ng-show="{{message.date_read != null}}">{{message.subject}}</div>
                    </td>
                    
                    <td><div ng-show="{{message.date_read == null}}"><b>{{message.date_send}}</b></div>
                        <div ng-show="{{message.date_read != null}}">{{message.date_send}}</div></td>

                    <td>
28
29
                        <a ng-show="{{message.date_read == null}}" ng-href="/messages/read/{{message.id}}.html" class="btn btn-success">Mark as Read</a>
                        <a ng-show="{{message.date_read != null}}" ng-href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a>
joansp's avatar
joansp committed
30
                        <button type="button" class="btn btn-info" ng-click="asRead(message.id)" data-toggle="modal" data-target="#modal{{message.id}}">View</button>
joansp's avatar
joansp committed
31
32
                    </td>
                    
joansp's avatar
joansp committed
33
                </tr>      
joansp's avatar
joansp committed
34
            </tbody>
joansp's avatar
joansp committed
35
        </table> 
joansp's avatar
joansp committed
36

joansp's avatar
joansp committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
        <div ng-repeat="message in list_message">       
        <div id="modal{{message.id}}" class="modal fade" role="dialog">
          <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">
                    <div ng-show="{{message.date_read == null}}"><i class="fa fa-circle" aria-hidden="true" style="color:#33ccff; margin:0 5px 0 0; size: 0.5em;"></i><b>{{message.subject}}</b></div>
                            
                    <div ng-show="{{message.date_read != null}}">{{message.subject}}</div>
                </h4>
              </div>
              <div class="modal-body">
52
                <p>     <div ng-bind-html='message.message' ng-show="{{message.message != ''}}">{{message.message}}</div>
joansp's avatar
joansp committed
53
54
55
56
                        <div ng-show="{{message.message == ''}}"><b>No message to show!</b></div>
                </p>
              </div>
              <div class="modal-footer">
57
                        <a ng-show="{{message.date_read != null}}" ng-href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a>
joansp's avatar
joansp committed
58
59
60
61
62
63
64
65
66
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              </div>
            </div>

          </div>
        </div>
        </div>

    </div>
67
</div>