~evanj/cms

ref: 40c0e4fc7f8f794524c1f37f2c5d7355b4985475 cms/internal/s/tmpl/html/space.html -rw-r--r-- 3.6 KiB
40c0e4fcEvan M Jones Chore(readme): Removing tag line. 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang=en>

<head>
  {{ template "html/_head.html" }}
  <title>CMS | {{ .Space.Name }}</title>
</head>

<body class=space style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>
    <article>

      <h1>{{ .Space.Name }}</h1>

      <details>
        <summary>Create Content Type</summary>
        <form method=POST action='/contenttype/new' enctype='multipart/form-data'>
          <input required type=hidden name=space value="{{ .Space.ID }}" />
          <br>
          <fieldset>
            <legend>Content type name</legend>
            <label for='create-name'>Name</label>
            <br>
            <input id='create-name' autofocus required type=text name=name placeholder="name" />
          </fieldset>
          <br>
          <fieldset>
          <legend>Fields</legend>
          <div id='first-fieldset'>
            <input readonly="readonly" required type=text name="field_name_1" value="name" />
            <select readonly="readonly" required name="field_type_1">
              <option disabled value>Field Type</option>
              <option selected value="StringSmall">String Small</option>
              <option disabled value="StringBig">String Big</option>
              <option disabled value="InputHTML">HTML</option>
              <option disabled value="InputMarkdown">Markdown</option>
              <option disabled value="File">File</option>
              <option disabled value="Date">Date</option>
              <option disabled value="Reference">Reference</option>
              <option disabled value="ReferenceList">ReferenceList</option>
            </select>
            <input disabled type=button value='Remove Field' />
          </div>
          <br>
          <input type=button id='add-fieldbtn' value='Add Another Field' />
          <input type=submit value=Create />
          </fieldset>
          <br>
        </form>
      </details>

      <details>
        <summary>Create Webhook</summary>
        <form method=POST action='/hook/new' enctype='multipart/form-data'>
          <input required type=hidden name=space value="{{ .Space.ID }}" />
          <br>
          <fieldset>
            <label for='webhook-url'>URL</label>
            <br>
            <input id='webhook-url' autofocus required type=url name=url placeholder='Must enter full URL of target' />
            <br>
            <br>
            <input type=submit value=Create />
          </fieldset>
          <br>
        </form>
      </details>

      <details>
        <summary>Delete {{ .Space.Name }} Space</summary>
        <form method=POST action='/space/delete' enctype='multipart/form-data'>
          <br>
          <fieldset>
            <input required type=hidden name=space value="{{ .Space.ID }}" />
            <input type=submit value=Delete />
          </fieldset>
          <br>
        </form>
      </details>

      <h2>Browse Content By Type</h2>
      {{ if .ContentTypes }}
        <ul>
          {{ range .ContentTypes }}
            <li><a href='/contenttype/{{ $.Space.ID }}/{{ .ID }}'>{{ .Name }}</a></li>
          {{ end }}
        </ul>
      {{ else }}
        <p>You haven't created any content types yet.</p>
      {{ end }}

      <h2>Browse Webhooks</h2>
      {{ if .Hooks}}
        <ul>
          {{ range .Hooks}}
            <li><a href='/hook/{{ $.Space.ID }}/{{ .ID }}'>{{ .URL }}</a></li>
          {{ end }}
        </ul>
      {{ else }}
        <p>You haven't created any webhooks yet.</p>
      {{ end }}

    </article>
    <hr/>
    {{ template "html/_footer.html" }}
  </main>
  <script>{{ template "js/space.js" }}</script>
</body>

</html>