فهرست منبع

Add GroupActivity

Andrea Fazzi 5 سال پیش
والد
کامیت
837ccf7d97
3فایلهای تغییر یافته به همراه16 افزوده شده و 1 حذف شده
  1. 2 0
      orm/activity.go
  2. 13 0
      templates/activities_add_update.html.tpl
  3. 1 1
      watch.sh

+ 2 - 0
orm/activity.go

@@ -18,6 +18,8 @@ type Activity struct {
 	Subject       *Subject
 	Student       *Student
 
+	GroupActivity bool
+
 	ClassID         uint `schema:"class_id"`
 	TeacherID       uint `schema:"teacher_id"`
 	SupplyTeacherID uint `schema:"supply_teacher_id"`

+ 13 - 0
templates/activities_add_update.html.tpl

@@ -130,11 +130,24 @@
       </select>
     </div>
 
+
     <div class="form-group">
       <label class="control-label" for="hours">Numero di ore</label>
       <input class="form-control" min="0" type="number" name="hours" id="hours" {{if .Options.Get "update"}}value="{{.Data.Activity.Hours}}"{{end}} required>
     </div>
 
+    
+    <div class="form-group">
+      <div class="form-check">
+        <input type="checkbox" name="GroupActivity" class="form-check-input" id="activity_group_activity" {{if .Options.Get "update"}}{{if .Data.Activity.GroupActivity}}checked{{end}}{{end}}>
+        <label class="form-check-label" for="activity_group_activity">Attività di gruppo</label>
+        <small id="activity_group_help_box" class="form-text text-muted">
+          Spuntare la casella sopra nel caso di attività che coinvolgono più studenti contemporaneamente.
+        </small>
+      </div>
+    </div>
+
+
     <div class="form-group">
       <button type="submit" class="btn btn-primary">Salva</button>
       {{if .Options.Get "update"}}

+ 1 - 1
watch.sh

@@ -1,5 +1,5 @@
 #!/bin/sh
 while inotifywait -r -e modify ./; do
-  docker-compose -f compose/karmen/docker-compose.yml down -v
+  docker-compose -f compose/karmen/docker-compose.yml down
   docker-compose -f compose/karmen/docker-compose.yml up --build -d
 done