<commit_before>extends ../editor

append head

    script
        | var appData = {};
        - if (typeof(routeData) !== 'undefined')
            | appData.routeData = !{routeData};
            //- | console.log('Loaded route with poiData:', !{poiData});
        - if (typeof(picturesData) !== 'undefined')
            | appData.picturesData = !{picturesData};
            //- | console.log('Loaded route with picturesData:', !{picturesData});
        - if (typeof(poisData) !== 'undefined')
            | appData.poisData = !{poisData};
            //- | console.log('Loaded route with poisData:', !{poisData});
        - if (typeof(groupsData) !== 'undefined')
            | appData.groupsData = !{groupsData};
            //- | console.log('Loaded route with groupsData:', !{groupsData});
        - if (typeof(userGroups) !== 'undefined')
            | appData.userGroups = !{userGroups};
            //- | console.log('Loaded route with userGroups:', !{userGroups});
        - if (typeof(userData) !== 'undefined')
            | appData.userData = !{userData};
            //- | console.log('Loaded route with userData:', !{userData});
        - if (typeof(externalGroups) !== 'undefined')
            | appData.externalGroups = !{externalGroups};
            //- | console.log('Loaded route with externalGroups:', !{externalGroups});
        | define('state', appData);

    script.
        require(['/scripts/apps/route-edit.js']);

block navbarHeader
    a.navbar-brand(href="/" alt="Til mine turer")
        img(src="/images/ut-no-logo-hvit.png")
    div.navbar-brand.hidden-xs.route-name(data-placeholder-for="route-name")
        if routeData
            | #{routeName}
        else
            | Tur uten navn

    button.navbar-toggle(type="button" data-toggle="collapse" data-target="#app-navigation-collapse")
        span.sr-only Vis meny
        span.icon-bar
        span.icon-bar
        span.icon-bar

block navbarCollapse

    // Scrollspy navigation
    ul.nav.navbar-nav.navbar-center.hidden-sm

        li.link-route-draw.active
            a(href="#inntegning")
                span.glyphicon.glyphicon-globe
                | &nbsp;Inntegning
        li.link-route-pictures
            a(href="#bilder")
                span.glyphicon.glyphicon-picture
                | &nbsp;Bilder
        li.link-route-pois
            a(href="#steder")
                span.glyphicon.glyphicon-map-marker
                | &nbsp;Steder
        li.link-route-facts
            a(href="#detaljer")
                span.glyphicon.glyphicon-list
                | &nbsp;Fakta


    // Right side navigation
    ul.nav.navbar-nav.navbar-right

        li.action-do-save
            a(data-action="do-save" data-toggle="tooltip" data-placement="bottom").route-save
                span.glyphicon.glyphicon-floppy-disk
                | &nbsp;Lagre
        li.action-do-switch-published-state
            a(data-action="do-publish")
                span.glyphicon.glyphicon-cloud-upload
                | &nbsp;Publiser
            a(data-action="do-unpublish")
                span.glyphicon.glyphicon-cloud-download
                | &nbsp;Avpubliser

        // Divider
        li.divider.hidden-lg.hidden-md.hidden-sm

        include ../dropdownmenu

block content

    div.container

        div#inntegning.page-block.route-draw(data-view="route-draw")
        div(data-container-for="map")
            div.route-map(data-view="route-map")
        div(data-container-for="boundary-intersect")

        // Modal map container
        div#modal-map.modal.fade.modal-map(tabindex="-1" role="dialog" aria-labelledby="modal-map-label" aria-hidden="true")
            div.modal-dialog
                div.modal-content
                    div.modal-header
                        button(type="button" class="close" data-dismiss="modal" aria-hidden="true") &times;
                        h4.modal-title(id="modal-map-title") Posisjonér i kart
                    div.modal-body(id="modal-map-body")
                    div.modal-footer
                        button(type="button" class="btn btn-primary" data-dismiss="modal") Ferdig


        div#bilder.page-block.route-pictures(data-view="route-pictures")
        div#steder.page-block.route-pois(data-view="route-pois")
        div#detaljer.page-block.route-details(data-view="route-details")
            include partials/edit-details
        div#merking.page-block.route-marking(data-view="route-marking")
            h3 Rute og merking
            div.row
                div.col-sm-12
                    div.form-horizontal
                        div.form-group
                            label.control-label.col-lg-2.col-md-2.col-sm-3 Sett som rute
                            div.col-lg-7.col-md-7.col-sm-7
                                button.btn.btn-default(type="button" data-action="set-as-marked-route") Sett som rute
                            div.col-lg-7.col-md-7.col-sm-7.col-lg-offset-2.col-md-offset-2.col-sm-offset-3
                                p.help-block Gjør dette turforslaget om til en rute. Som rute har man mulighet til å legge til en del ekstra informasjon som rutekode, merkestandard med mer.

        include partials/edit-done
<commit_msg>Only allow admins to create rute from turforslag<commit_after>extends ../editor

append head

    script
        | var appData = {};
        - if (typeof(routeData) !== 'undefined')
            | appData.routeData = !{routeData};
            //- | console.log('Loaded route with poiData:', !{poiData});
        - if (typeof(picturesData) !== 'undefined')
            | appData.picturesData = !{picturesData};
            //- | console.log('Loaded route with picturesData:', !{picturesData});
        - if (typeof(poisData) !== 'undefined')
            | appData.poisData = !{poisData};
            //- | console.log('Loaded route with poisData:', !{poisData});
        - if (typeof(groupsData) !== 'undefined')
            | appData.groupsData = !{groupsData};
            //- | console.log('Loaded route with groupsData:', !{groupsData});
        - if (typeof(userGroups) !== 'undefined')
            | appData.userGroups = !{userGroups};
            //- | console.log('Loaded route with userGroups:', !{userGroups});
        - if (typeof(userData) !== 'undefined')
            | appData.userData = !{userData};
            //- | console.log('Loaded route with userData:', !{userData});
        - if (typeof(externalGroups) !== 'undefined')
            | appData.externalGroups = !{externalGroups};
            //- | console.log('Loaded route with externalGroups:', !{externalGroups});
        | define('state', appData);

    script.
        require(['/scripts/apps/route-edit.js']);

block navbarHeader
    a.navbar-brand(href="/" alt="Til mine turer")
        img(src="/images/ut-no-logo-hvit.png")
    div.navbar-brand.hidden-xs.route-name(data-placeholder-for="route-name")
        if routeData
            | #{routeName}
        else
            | Tur uten navn

    button.navbar-toggle(type="button" data-toggle="collapse" data-target="#app-navigation-collapse")
        span.sr-only Vis meny
        span.icon-bar
        span.icon-bar
        span.icon-bar

block navbarCollapse

    // Scrollspy navigation
    ul.nav.navbar-nav.navbar-center.hidden-sm

        li.link-route-draw.active
            a(href="#inntegning")
                span.glyphicon.glyphicon-globe
                | &nbsp;Inntegning
        li.link-route-pictures
            a(href="#bilder")
                span.glyphicon.glyphicon-picture
                | &nbsp;Bilder
        li.link-route-pois
            a(href="#steder")
                span.glyphicon.glyphicon-map-marker
                | &nbsp;Steder
        li.link-route-facts
            a(href="#detaljer")
                span.glyphicon.glyphicon-list
                | &nbsp;Fakta


    // Right side navigation
    ul.nav.navbar-nav.navbar-right

        li.action-do-save
            a(data-action="do-save" data-toggle="tooltip" data-placement="bottom").route-save
                span.glyphicon.glyphicon-floppy-disk
                | &nbsp;Lagre
        li.action-do-switch-published-state
            a(data-action="do-publish")
                span.glyphicon.glyphicon-cloud-upload
                | &nbsp;Publiser
            a(data-action="do-unpublish")
                span.glyphicon.glyphicon-cloud-download
                | &nbsp;Avpubliser

        // Divider
        li.divider.hidden-lg.hidden-md.hidden-sm

        include ../dropdownmenu

block content

    div.container

        div#inntegning.page-block.route-draw(data-view="route-draw")
        div(data-container-for="map")
            div.route-map(data-view="route-map")
        div(data-container-for="boundary-intersect")

        // Modal map container
        div#modal-map.modal.fade.modal-map(tabindex="-1" role="dialog" aria-labelledby="modal-map-label" aria-hidden="true")
            div.modal-dialog
                div.modal-content
                    div.modal-header
                        button(type="button" class="close" data-dismiss="modal" aria-hidden="true") &times;
                        h4.modal-title(id="modal-map-title") Posisjonér i kart
                    div.modal-body(id="modal-map-body")
                    div.modal-footer
                        button(type="button" class="btn btn-primary" data-dismiss="modal") Ferdig


        div#bilder.page-block.route-pictures(data-view="route-pictures")
        div#steder.page-block.route-pois(data-view="route-pois")
        div#detaljer.page-block.route-details(data-view="route-details")
            include partials/edit-details

        div#merking.page-block.route-marking(data-view="route-marking")
            if isAdmin
                h3 Rute og merking
                div.row
                    div.col-sm-12
                        div.form-horizontal
                            div.form-group
                                label.control-label.col-lg-2.col-md-2.col-sm-3 Sett som rute
                                div.col-lg-7.col-md-7.col-sm-7
                                    button.btn.btn-default(type="button" data-action="set-as-marked-route") Sett som rute
                                div.col-lg-7.col-md-7.col-sm-7.col-lg-offset-2.col-md-offset-2.col-sm-offset-3
                                    p.help-block Gjør dette turforslaget om til en rute. Som rute har man mulighet til å legge til en del ekstra informasjon som rutekode, merkestandard med mer.

        include partials/edit-done

{'fraction_non_alphanumeric': 0.13500992720052946, 'fraction_numerical': 0.003214522076203082, 'mean_word_length': 1.7976725733932821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3362186', 'n_tokens_mistral': 3254, 'n_tokens_neox': 3069, 'n_words': 475}