Bladeren bron

Merge branch 'master' of https://github.com/Musare/Musare

Conflicts:
	app/client/client.js
KrisVos130 9 jaren geleden
bovenliggende
commit
666d45f7e5
4 gewijzigde bestanden met toevoegingen van 23 en 4 verwijderingen
  1. 1 0
      app/client/app.css
  2. 7 0
      app/client/client.js
  3. 11 4
      app/client/templates/admin.html
  4. 4 0
      app/server/server.js

+ 1 - 0
app/client/app.css

@@ -260,6 +260,7 @@ ul {
   background-color: rgb(102, 205, 170);
   color: white;
   overflow-y: scroll;
+  margin-top: 20px;
 }
 
 .admin-container h1 {

+ 7 - 0
app/client/client.js

@@ -5,6 +5,7 @@ Meteor.startup(function() {
 });
 
 Meteor.subscribe("queues");
+Meteor.subscribe("reports");
 Meteor.subscribe("chat");
 Meteor.subscribe("playlists");
 Meteor.subscribe("alerts");
@@ -735,6 +736,10 @@ Template.admin.helpers({
           }
       });
       return playlists;
+  },
+  reports: function() {
+      var reports = Reports.find({}).fetch();
+      console.log(reports);
   }
 });
 
@@ -782,6 +787,7 @@ Template.stations.events({
         $("#img").val(this.img);
         $("#id").val(this.id);
         $("#duration").val(this.duration);
+        $("#skip-duration").val(this.skipDuration);
     },
     "click .edit-playlist-button": function(e){
         Session.set("song", this);
@@ -793,6 +799,7 @@ Template.stations.events({
         $("#img").val(this.img);
         $("#id").val(this.id);
         $("#duration").val(this.duration);
+        $("#skip-duration").val(this.skipDuration);
     },
     "click .add-song-button": function(e){
         var genre = $(e.toElement).data("genre") || $(e.toElement).parent().data("genre");

+ 11 - 4
app/client/templates/admin.html

@@ -2,8 +2,8 @@
     {{> alerts}}
     <div class="landing">
         {{> header}}
-          <div class="row" style="margin-top: 20px;">
-            <div class="col-md-5 col-md-offset-1 admin-container" style="height: 400px">
+          <div class="row" style="margin-top: 20px; height: 100%;">
+            <div class="col-md-5 col-md-offset-1 admin-container" style="height: 50%;">
               <h1>Playlists</h1>
               {{#each playlists}}
                 <p>{{display}} playlist</p>
@@ -19,17 +19,24 @@
                     <td>{{songs.length}}</td>
                     <td></td>
                     <td></td>
-                    <td></td>
+                    <td>{{reports}}</td>
                     <td>{{queueCount @index}}</td>
                     <td><a href="/stations">Edit</a></td>
                   </tr>
                 </table>
               {{/each}}
             </div>
-            <div class="col-md-3 col-md-offset-2 admin-container">
+            <div class="col-md-4 col-md-offset-1 admin-container" style="height: 30%;">
               <h1>Site statistics</h1>
               <p>Total Users: {{{users}}}</p>
             </div>
+            <div style="clear: both;"></div>
+                <div class="col-md-5 col-md-offset-1 admin-container" style="height: 50%;">
+                    <h1>Reports</h1>
+                </div>
+                <div class="col-md-4 col-md-offset-1 admin-container" style="height: 50%">
+                    <h1>Reports</h1>
+                </div>
           </div>
 
           <ul class="bg-bubbles">

+ 4 - 0
app/server/server.js

@@ -413,6 +413,10 @@ Meteor.publish("queues", function() {
     return Queues.find({});
 });
 
+Meteor.publish("reports", function() {
+    return Reports.find({});
+});
+
 Meteor.publish("chat", function() {
     return Chat.find({});
 });