#4 #7 Upload Images in Gallery PAge
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6611640a35
commit
75a336675d
5 changed files with 40 additions and 19 deletions
1
files.go
1
files.go
|
@ -55,6 +55,7 @@ func uploadImageForm(t template.Template, data template.Data , s session.Session
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data["id"] = id
|
data["id"] = id
|
||||||
|
data["active"] = "upload"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,8 @@ func galleryEdit(t template.Template,data template.Data, c flamego.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data["gallery"] = galleries[0]
|
data["gallery"] = galleries[0]
|
||||||
|
data["id"] = galleries[0].Id
|
||||||
|
data["active"] = "general"
|
||||||
|
|
||||||
|
|
||||||
t.HTML(http.StatusOK, "gallery_edit")
|
t.HTML(http.StatusOK, "gallery_edit")
|
||||||
|
|
|
@ -1,11 +1,26 @@
|
||||||
{{template "top" .}}
|
|
||||||
<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
|
<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
|
||||||
<div class="container" style="margin-top: 100px;">
|
|
||||||
<div class="col-12">
|
{{template "top" .}}
|
||||||
<h1>Dashboard</h1>
|
<style type="text/css">
|
||||||
<div id="drag-drop-area"></div>
|
.line { width:100%; text-align:left; border-bottom: 1px solid #8f8f8f; line-height:0.1em; margin:10px 0 20px; color: #8f8f8f; }
|
||||||
|
.line span { background:#fff; padding:0 10px; margin-left: 50px; }
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="/public/croppie.css" />
|
||||||
|
<script src="/public/croppie.js"></script>
|
||||||
|
<div class="container" style="margin-top: 100px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{template "gallery_nav" .}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div id="drag-drop-area"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
|
<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -8,19 +8,7 @@
|
||||||
<div class="container" style="margin-top: 100px;">
|
<div class="container" style="margin-top: 100px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="list-group">
|
{{template "gallery_nav" .}}
|
||||||
<a href="#" class="list-group-item list-group-item-action active" aria-current="true">
|
|
||||||
General
|
|
||||||
</a>
|
|
||||||
<!--<a href="#" class="list-group-item list-group-item-action" aria-current="true">
|
|
||||||
Details
|
|
||||||
</a>!-->
|
|
||||||
<a href="#" class="list-group-item list-group-item-action" aria-current="true">
|
|
||||||
Images
|
|
||||||
</a>
|
|
||||||
<!--<a href="#" class="list-group-item list-group-item-action">Sicherheit</a>
|
|
||||||
<a class="list-group-item list-group-item-action disabled">A disabled link item</a>!-->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
|
15
templates/inc/gallery_nav.tmpl
Normal file
15
templates/inc/gallery_nav.tmpl
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{{define "gallery_nav"}}
|
||||||
|
<div class="list-group">
|
||||||
|
<a href="/gallery/edit/{{ .id }}" class="list-group-item list-group-item-action {{if eq .active "general"}}active{{end}}" aria-current="true">
|
||||||
|
General
|
||||||
|
</a>
|
||||||
|
<!--<a href="#" class="list-group-item list-group-item-action" aria-current="true">
|
||||||
|
Details
|
||||||
|
</a>!-->
|
||||||
|
<a href="/file/upload?id={{ .id }}" class="list-group-item list-group-item-action {{if eq .active "upload"}}active{{end}} " aria-current="true">
|
||||||
|
Images Upload
|
||||||
|
</a>
|
||||||
|
<!--<a href="#" class="list-group-item list-group-item-action">Sicherheit</a>
|
||||||
|
<a class="list-group-item list-group-item-action disabled">A disabled link item</a>!-->
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
Reference in a new issue