Wesley McCann пре 9 година
родитељ
комит
c2301d546c
2 измењених фајлова са 5 додато и 44 уклоњено
  1. 3 8
      app/client/client.js
  2. 2 36
      app/client/templates/admin.html

+ 3 - 8
app/client/client.js

@@ -619,6 +619,8 @@ Template.room.events({
     },
     "click #report-song-button": function() {
         var report = {};
+
+        report.reportType = $(".checkbox")
         report.reportSongB = $("#report-song").is(":checked");
         report.reportTitleB = $("#report-title").is(":checked");
         report.reportAuthorB = $("#report-author").is(":checked");
@@ -989,15 +991,8 @@ Template.admin.helpers({
       });
       return playlists;
   }/*,
-  reports: function() {
-      var reports = Reports.find({}).fetch();
-      reports.findOne(
-        {
-          $eq: [
+  reportsCount: function() {
 
-          ]
-        }
-      )
   }*/
 });
 

+ 2 - 36
app/client/templates/admin.html

@@ -21,7 +21,7 @@
                     <td>{{songs.length}}</td>
                     <td></td>
                     <td></td>
-                    <td></td>
+                    <td>{{reportsCount display}}</td>
                     <td>{{queueCount display}}</td>
                     <td><a href="/admin/stations">Edit</a></td>
                   </tr>
@@ -33,42 +33,8 @@
                 <h1>Site statistics</h1>
               </div>
               <p>Total Users Online: {{users}}</p>
+              <p>Total Registered Users: </p>
             </div>
-            <div style="clear: both;"></div>
-                <div class="col-md-5 col-md-offset-1 admin-container" style="height: 50%;">
-                  <div>
-                    <h1>Song Requests</h1><a href="/admin/queues" style="margin-left:10px;">(review)</a>
-                  </div>
-                    <table class="table queueTable">
-                      <tr>
-                        <th>Playlist</th>
-                        <th>Title</th>
-                        <th>Artist</th>
-                        <th>Duration</th>
-                        <th>Type</th>
-                      </tr>
-                      {{#each queues}}
-                        {{#each songs}}
-                          <tr>
-                            <td>{{../type}}</td>
-                            <td>{{title}}</td>
-                            <td>{{artist}}</td>
-                            <td>{{duration}}</td>
-                            <td>{{type}}</td>
-                            <!--<td><a href="/stations">Edit</a></td>-->
-                          </tr>
-                          {{/each}}
-                      {{/each}}
-                      </table>
-                </div>
-                <div class="col-md-4 col-md-offset-1 admin-container" style="height: 50%">
-                  <div>
-                    <h1>Reports</h1>
-                  </div>
-                    {{#each reports}}
-                      <p>{{reports}}</p>
-                    {{/each}}
-                </div>
           </div>
 
         {{> bubbles}}