diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c013cf6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+
+PPGo_Job
diff --git a/controllers/task.go b/controllers/task.go
index efb0a72..1c748b8 100644
--- a/controllers/task.go
+++ b/controllers/task.go
@@ -149,6 +149,10 @@ func (this *TaskController) Edit() {
this.showMsg(err.Error())
}
+ if task.Status != 0 {
+ this.ajaxMsg("激活状态无法编辑任务,请先暂停任务", MSG_ERR)
+ }
+
if this.isPost() {
task.TaskName = strings.TrimSpace(this.GetString("task_name"))
task.Description = strings.TrimSpace(this.GetString("description"))
diff --git a/views/task/list.html b/views/task/list.html
index a6a7b50..a771614 100644
--- a/views/task/list.html
+++ b/views/task/list.html
@@ -91,14 +91,21 @@
激活
- {{else}}
+ {{else}}
暂停
- {{end}}
-
+ {{end}}
+ {{if eq $v.status 0}}
+
编辑
+ {{else}}
+
+ 编辑
+
+ {{end}}
+
执行