updateInformation.pug 8.69 KB
Newer Older
Rosanny Sihombing's avatar
Rosanny Sihombing committed
1
2
3
4
5
6
doctype html
html(lang="de")
  head
    title= "Update a website"
    meta(charset="UTF-8")
    meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
7
8
    link(rel="stylesheet", type="text/css", href="/css/bootstrap.min.css")
    link(rel="stylesheet", type="text/css", href="/css/m4lab.css")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
9
10
11
12
13
14
15
16
17
18
    link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.2/css/all.css", integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay", crossorigin="anonymous")
  body
    div(class="container")
        div(class="row min-vh-100 flex-column flex-md-row")
            aside(class="col-12 col-md-3 p-0 flex-shrink-1")
                nav(class="navbar navbar-expand flex-md-column flex-row align-items-start py-2")
                    div(class="collapse navbar-collapse")
                        ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
                            li(class="nav-item")
                                a(class="nav-link pl-0 text-nowrap" href="/account/")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
19
                                    span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName}
Rosanny Sihombing's avatar
Rosanny Sihombing committed
20
21
22
23
                            li(class="nav-item")
                                a(class="nav-link pl-0" href="/account/profile")
                                    i(class="fa fa-user fa-fw")
                                    span(class="d-none d-md-inline") Benutzerprofil
Rosanny Sihombing's avatar
Rosanny Sihombing committed
24
                            if user.is_m4lab_idp
Rosanny Sihombing's avatar
Rosanny Sihombing committed
25
26
27
28
29
30
31
32
33
34
35
36
37
                                li(class="nav-item")
                                    a(class="nav-link pl-0" href="/account/security")
                                        i(class="fa fa-lock fa-fw")
                                        span(class="d-none d-md-inline") Sicherheitseinstellungen
                            li(class="nav-item")
                                a(class="nav-link pl-0" href="/account/services")
                                    i(class="fa fa-tasks fa-fw" style="color:black;")
                                    span(class="d-none d-md-inline" style="color:black;") Projekte und Dienste
                            li(class="nav-item")
                                a(class="nav-link pl-0" href="/logout" style="color:red;")
                                    i(class="fa fa-sign-out-alt fa-fw")
                                    span(class="d-none d-md-inline") Logout
            main(class="col bg-faded py-3 flex-grow-1")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
38
39
40
41
42
43
44
45
                nav(aria-label="breadcrumb")
                    ol(class="breadcrumb")
                        li(class="breadcrumb-item")
                            a(href="/account") Konto
                        li(class="breadcrumb-item")
                            a(href="/account/services") Projekte und Dienste
                        li(class="breadcrumb-item active" aria-current="page") Information aktualisieren

Rosanny Sihombing's avatar
Rosanny Sihombing committed
46
47
48
49
50
51
                if flash.success
                    div.alert.alert-success.alert-dismissible #{flash.success}
                        a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
                if flash.error
                    div.alert.alert-danger.alert-dismissible.fade.show #{flash.error}
                        a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
Rosanny Sihombing's avatar
Rosanny Sihombing committed
52
                h3(class="pb-2") Information aktualisieren
Rosanny Sihombing's avatar
Rosanny Sihombing committed
53
54
                div(class="mx-4")
                    if !information.isPublished
Rosanny Sihombing's avatar
Rosanny Sihombing committed
55
56
                        h4(class="pb-1") Schritt 1: Setup
                        p Bitte füllen Sie alle Felder aus
Rosanny Sihombing's avatar
Rosanny Sihombing committed
57
58
59
60
61
                    form(method="POST", encType="multipart/form-data")
                        div(class='form-group row')
                            label(for="name", class="col-sm-2") Name
                            div(class="col-sm-8")
                                input#name(name="name", type="text", class="form-control", value=information.name, placeholder="Name", maxlength="75" required)
Rosanny Sihombing's avatar
Rosanny Sihombing committed
62
                                | <p id="nameInfo" class="font-italic font-weight-light"><small>Ihre Webseite URL: <strong>https://transfer.hft-stuttgart.de/pages/#{information.path}</strong></small></p>
Rosanny Sihombing's avatar
Rosanny Sihombing committed
63
                        div(class="form-group row")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
64
                            label(for="description", class="col-sm-2") Beschreibung
Rosanny Sihombing's avatar
Rosanny Sihombing committed
65
                            div(class="col-sm-8")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
66
                                textarea#description(name="description", type="text", class="form-control", placeholder="Beschreibung", maxlength="500" required) #{information.desc}
Rosanny Sihombing's avatar
Rosanny Sihombing committed
67
                        div(class="form-group row")    
Rosanny Sihombing's avatar
Rosanny Sihombing committed
68
                            label(for="logo", class="col-sm-2") Projektlogo
Rosanny Sihombing's avatar
Rosanny Sihombing committed
69
70
71
72
73
                            div(class="col-sm-8")
                                div(class="form-group row")
                                    img(src=information.logo, width="100" height="100")
                                div(class="form-group row")
                                    input#logo(name="logo", class="form-control-file", type="file")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
74
75
76
77
78
                        if !information.isPublished
                            input(name="isPublished", type="hidden", value="false")
                        else
                            input(name="isPublished", type="hidden", value="true")
                        input(type="submit", class="btn btn-primary", value="Speichern")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
79
80
81
                hr
                div(class="mx-4")
                    if !information.isPublished
Rosanny Sihombing's avatar
Rosanny Sihombing committed
82
83
                        h4(class="pb-1") Schritt 2: Dateneingabe
                        p Bitte stellen Sie sicher, dass sie Folgendes abgeschlossen haben, bevor Sie Ihre Webseite veröffentlichen:
Rosanny Sihombing's avatar
Rosanny Sihombing committed
84
                    else    
Rosanny Sihombing's avatar
Rosanny Sihombing committed
85
                        p <b><i>ANMERKUNG:</b></i>
Rosanny Sihombing's avatar
Rosanny Sihombing committed
86
87
88
89
90
91
92
93
94
95
                    div(class="card")
                        div(class="card-header") 1. Anpassen der Standardwerte in <a href=#{information.settingUrl} target="_blank"><i>settings.js</i></a>
                        div(class="card-body") Passen Sie die Werte für projektname und projektseitenlink an, indem Sie die entsprechenden Werte in die Anführungszeichen schreiben.
                            img(src="https://m4lab.hft-stuttgart.de/img/help/edit_settings.png", class="img-fluid", style="border: 1px solid gray;", alt="setting.js")
                            p Klicken Sie anschließend auf <i>commit changes</i>, um die Änderungen zu speichern.
                    div(class="card")
                        div(class="card-header") 2. Anpassen der Kontaktperson in <a href=#{information.kontaktUrl} target="_blank"><i>kontakt.html</i></a>
                        div(class="card-body") Passen Sie die Kontaktperson und die Mailadresse an, indem Sie alle Vorkommen von Max Mustermann und die Mailadresse durch Ihre Werte ersetzen.
                            img(src="https://m4lab.hft-stuttgart.de/img/help/edit_contact.png", class="img-fluid", style="border: 1px solid gray;", alt="kontakt.html")
                            p Klicken Sie anschließend auf <i>commit changes</i>, um die Änderungen zu speichern.
Rosanny Sihombing's avatar
Rosanny Sihombing committed
96
97
98
                hr
                div(class="mx-4")
                    if !information.isPublished
Rosanny Sihombing's avatar
Rosanny Sihombing committed
99
100
                        h4(class="pb-1") Schritt 3: Veröffentlichen
                        p Folgende Anfrage wird an die Administration des Transferportal gesandt, um ihre Webseite/ Informationsseite zu veröffentlichen:
Rosanny Sihombing's avatar
Rosanny Sihombing committed
101
102
103
104
                        table(class="table-secondary")
                            tr
                                td Guten Tag, <br><br> hiermit beantrage Ich die Freischaltung einer Webseite auf dem Transferportal für folgendes Projekt:<br>#{information.name}<br><br>Vielen Dank,<br> #{user.fullName}
                        br
Rosanny Sihombing's avatar
Rosanny Sihombing committed
105
                        button(type="button", class="btn btn-primary", onclick="sendPublishRequest()") Nachricht versenden
Rosanny Sihombing's avatar
Rosanny Sihombing committed
106
107
108
109

    // jQuery
    script(src="https://code.jquery.com/jquery-3.3.1.min.js")
    script(src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js", integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1", crossorigin="anonymous")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
110
111
    // jquery-loading-overlay
    script(src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js")
Rosanny Sihombing's avatar
Rosanny Sihombing committed
112
113
114
115
116
117
118
119
120
    // Bootstrap
    script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
    // M4_LAB
    script(src="/js/headfoot.js")
    script.
        function sendPublishRequest() {
            $.post("/sendPublishRequest", {projectName: $("#name").val()}, function(resp){
                alert(resp)
            })
Rosanny Sihombing's avatar
Rosanny Sihombing committed
121
122
123
124
125
        }

         $("form").submit(function(){
            $.LoadingOverlay("show")
        });