Name
Todo list

Description
Simple todo list

Pack
{
  "pages": [
    {
      "name": "TodoListPage",
      "title": "Saltcorn todo list",
      "layout": {
        "above": [
          {
            "name": "55141",
            "type": "view",
            "view": "DoneFilter",
            "state": "shared"
          },
          {
            "name": "8da486",
            "type": "view",
            "view": "List Todos",
            "state": "shared"
          }
        ]
      },
      "min_role": 10,
      "description": "",
      "fixed_states": {},
      "root_page_for_roles": [
        "admin",
        "staff",
        "user",
        "public"
      ]
    }
  ],
  "views": [
    {
      "name": "DoneFilter",
      "table": "TodoItems",
      "min_role": 10,
      "on_root_page": false,
      "viewtemplate": "Filter",
      "configuration": {
        "layout": {
          "above": [
            {
              "type": "blank",
              "contents": "Show items that are done",
              "isFormula": {}
            },
            {
              "type": "dropdown_filter",
              "field_name": "done"
            }
          ]
        },
        "columns": [
          {
            "type": "DropDownFilter",
            "field_name": "done"
          }
        ],
        "viewname": "DoneFilter"
      },
      "default_render_page": ""
    },
    {
      "name": "EditTodo",
      "table": "TodoItems",
      "min_role": 10,
      "on_root_page": false,
      "viewtemplate": "Edit",
      "configuration": {
        "fixed": {
          "done": false
        },
        "layout": {
          "above": [
            {
              "aligns": [
                "left",
                "left"
              ],
              "widths": [
                1,
                6,
                5
              ],
              "besides": [
                {
                  "above": [
                    null,
                    {
                      "type": "blank",
                      "contents": "New"
                    }
                  ]
                },
                {
                  "above": [
                    null,
                    {
                      "type": "field",
                      "fieldview": "edit",
                      "field_name": "description"
                    }
                  ]
                },
                {
                  "type": "action",
                  "minRole": 10,
                  "action_name": "Save"
                }
              ]
            },
            {
              "type": "line_break"
            }
          ]
        },
        "columns": [
          {
            "type": "Field",
            "fieldview": "edit",
            "field_name": "description"
          },
          {
            "type": "Action",
            "minRole": 10,
            "action_name": "Save"
          }
        ],
        "viewname": "EditTodo",
        "view_when_done": "List Todos"
      },
      "default_render_page": ""
    },
    {
      "name": "List Todos",
      "table": "TodoItems",
      "min_role": 10,
      "menu_label": "Todos",
      "on_root_page": true,
      "viewtemplate": "List",
      "configuration": {
        "columns": [
          {
            "type": "Field",
            "fieldview": "as_text",
            "field_name": "description",
            "state_field": "on",
            "header_label": ""
          },
          {
            "type": "Action",
            "action_name": "Toggle done",
            "action_size": "",
            "action_label": "done ? '☑' : '☐'",
            "action_style": "btn-link",
            "header_label": "done",
            "action_label_formula": "on"
          }
        ],
        "viewname": "List Todos",
        "default_state": {
          "done": null,
          "description": "",
          "_create_db_view": false,
          "_omit_state_form": true
        },
        "view_to_create": "EditTodo",
        "create_view_label": null,
        "create_view_display": "Embedded"
      },
      "default_render_page": "TodoListPage"
    }
  ],
  "tables": [
    {
      "name": "TodoItems",
      "fields": [
        {
          "name": "description",
          "type": "String",
          "label": "Description",
          "stored": false,
          "required": true,
          "is_unique": false,
          "attributes": {
            "options": ""
          },
          "calculated": false,
          "expression": null
        },
        {
          "name": "done",
          "type": "Bool",
          "label": "Done",
          "stored": false,
          "required": true,
          "is_unique": false,
          "attributes": {},
          "calculated": false,
          "expression": null
        }
      ],
      "triggers": [],
      "versioned": false,
      "constraints": [],
      "min_role_read": 10,
      "min_role_write": 10
    }
  ],
  "plugins": []
}