diff --git a/composer.json b/composer.json index 5962102fdef7e513deacf4f2dc5ec6c91c0570a7..976ea9fca64e5c2d8df400a87b3e4ce5867ec6b5 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "jasig/phpcas": "1.3.x-dev", "pear-pear.php.net/HTTP_Request2": "*", "tedivm/stash": "0.12.*", - "unl/php-wdn-templates": "^4.1", + "unl/php-wdn-templates": "^5.0", "unl/unl_cache_lite": "0.1.*", "php-activerecord/php-activerecord": "^1.1", "altorouter/altorouter": "1.1.0", diff --git a/composer.lock b/composer.lock index c44c13a30b32a060c4442ccec13c4c6f0d6935b3..b65661b9549e682eb1366d9aeb412cf67b0d90b5 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "0233ac3aa105773467e6e08fcdd59aa4", - "content-hash": "262079e51c08cef2c1fe3f454e4a9a60", + "content-hash": "b362f88167fa055a89a87e1f728c7e04", "packages": [ { "name": "altorouter/altorouter", @@ -56,7 +55,7 @@ "router", "routing" ], - "time": "2014-04-16 09:44:40" + "time": "2014-04-16T09:44:40+00:00" }, { "name": "jasig/phpcas", @@ -64,12 +63,12 @@ "source": { "type": "git", "url": "https://github.com/apereo/phpCAS.git", - "reference": "7a949dee79aaadc16161d7d4863b5c0871546222" + "reference": "2aaad206ee9a7f42b9ea8a40ca8053dfa1634596" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7a949dee79aaadc16161d7d4863b5c0871546222", - "reference": "7a949dee79aaadc16161d7d4863b5c0871546222", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/2aaad206ee9a7f42b9ea8a40ca8053dfa1634596", + "reference": "2aaad206ee9a7f42b9ea8a40ca8053dfa1634596", "shasum": "" }, "require": { @@ -111,14 +110,14 @@ "cas", "jasig" ], - "time": "2018-03-15 13:17:25" + "time": "2019-01-01T10:53:16+00:00" }, { "name": "pear-pear.php.net/Archive_Tar", - "version": "1.4.0", + "version": "1.4.3", "dist": { "type": "file", - "url": "http://pear.php.net/get/Archive_Tar-1.4.0.tgz", + "url": "http://pear.php.net/get/Archive_Tar-1.4.3.tgz", "reference": null, "shasum": null }, @@ -126,7 +125,7 @@ "php": ">=5.2.0.0" }, "replace": { - "pear-pear/archive_tar": "== 1.4.0.0" + "pear-pear/archive_tar": "== 1.4.3.0" }, "type": "pear-library", "autoload": { @@ -173,20 +172,20 @@ }, { "name": "pear-pear.php.net/HTTP_Request2", - "version": "2.2.1", + "version": "2.3.0", "dist": { "type": "file", - "url": "http://pear.php.net/get/HTTP_Request2-2.2.1.tgz", + "url": "http://pear.php.net/get/HTTP_Request2-2.3.0.tgz", "reference": null, "shasum": null }, "require": { - "pear-pear.php.net/net_url2": ">=2.0.0.0", + "pear-pear.php.net/net_url2": ">=2.2.0.0", "pear-pear.php.net/pear": ">=1.9.2.0", "php": ">=5.2.0.0" }, "replace": { - "pear-pear/http_request2": "== 2.2.1.0" + "pear-pear/http_request2": "== 2.3.0.0" }, "type": "pear-library", "autoload": { @@ -198,16 +197,16 @@ "/" ], "license": [ - "BSD License" + "BSD 3-Clause License" ], "description": "PHP5 rewrite of HTTP_Request package (with parts of HTTP_Client). Provides\ncleaner API and pluggable Adapters:\n * Socket adapter, based on old HTTP_Request code,\n * Curl adapter, wraps around PHP's cURL extension,\n * Mock adapter, to use for testing packages dependent on HTTP_Request2.\nSupports POST requests with data and file uploads, basic and digest\nauthentication, cookies, managing cookies across requests, proxies, gzip and\ndeflate encodings, redirects, monitoring the request progress with Observers..." }, { "name": "pear-pear.php.net/Net_URL2", - "version": "2.2.0", + "version": "2.2.1", "dist": { "type": "file", - "url": "http://pear.php.net/get/Net_URL2-2.2.0.tgz", + "url": "http://pear.php.net/get/Net_URL2-2.2.1.tgz", "reference": null, "shasum": null }, @@ -215,7 +214,7 @@ "php": ">=5.1.4.0" }, "replace": { - "pear-pear/net_url2": "== 2.2.0.0" + "pear-pear/net_url2": "== 2.2.1.0" }, "type": "pear-library", "autoload": { @@ -233,10 +232,10 @@ }, { "name": "pear-pear.php.net/PEAR", - "version": "1.10.1", + "version": "1.10.6", "dist": { "type": "file", - "url": "http://pear.php.net/get/PEAR-1.10.1.tgz", + "url": "http://pear.php.net/get/PEAR-1.10.6.tgz", "reference": null, "shasum": null }, @@ -254,7 +253,7 @@ "pear-pear.php.net/pear_frontend_web": "<=0.4.0.0" }, "replace": { - "pear-pear/pear": "== 1.10.1.0" + "pear-pear/pear": "== 1.10.6.0" }, "type": "pear-library", "autoload": { @@ -301,19 +300,19 @@ }, { "name": "pear-pear.php.net/XML_Util", - "version": "1.3.0", + "version": "1.4.3", "dist": { "type": "file", - "url": "http://pear.php.net/get/XML_Util-1.3.0.tgz", + "url": "http://pear.php.net/get/XML_Util-1.4.3.tgz", "reference": null, "shasum": null }, "require": { "ext-pcre": "*", - "php": ">=5.3.0.0" + "php": ">=5.4.0.0" }, "replace": { - "pear-pear/xml_util": "== 1.3.0.0" + "pear-pear/xml_util": "== 1.4.3.0" }, "type": "pear-library", "autoload": { @@ -367,20 +366,20 @@ "activerecord", "orm" ], - "time": "2017-06-11 22:05:37" + "time": "2017-06-11T22:05:37+00:00" }, { "name": "phpmailer/phpmailer", - "version": "v5.2.26", + "version": "v5.2.27", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "70362997bda4376378be7d92d81e2200550923f7" + "reference": "dde1db116511aa4956389d75546c5be4c2beb2a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/70362997bda4376378be7d92d81e2200550923f7", - "reference": "70362997bda4376378be7d92d81e2200550923f7", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dde1db116511aa4956389d75546c5be4c2beb2a6", + "reference": "dde1db116511aa4956389d75546c5be4c2beb2a6", "shasum": "" }, "require": { @@ -444,7 +443,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2017-11-04 09:26:05" + "time": "2018-11-15T22:32:31+00:00" }, { "name": "tedivm/stash", @@ -498,7 +497,7 @@ "redis", "sessions" ], - "time": "2015-01-17 07:51:57" + "time": "2015-01-17T07:51:57+00:00" }, { "name": "unl/php-dwt-parser", @@ -549,20 +548,20 @@ ], "description": "A PHP library for parsing DWT files and turning them into PHP classes", "homepage": "http://wdn.unl.edu/", - "time": "2016-01-05 21:35:46" + "time": "2016-01-05T21:35:46+00:00" }, { "name": "unl/php-wdn-templates", - "version": "v4.1.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/unl/phpunltemplates.git", - "reference": "ddece80fce8611c22fa674a0f36eac3ddf4ca423" + "reference": "2928e588f409c2628bfeccb5293ab0dd34a506c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/unl/phpunltemplates/zipball/ddece80fce8611c22fa674a0f36eac3ddf4ca423", - "reference": "ddece80fce8611c22fa674a0f36eac3ddf4ca423", + "url": "https://api.github.com/repos/unl/phpunltemplates/zipball/2928e588f409c2628bfeccb5293ab0dd34a506c5", + "reference": "2928e588f409c2628bfeccb5293ab0dd34a506c5", "shasum": "" }, "require": { @@ -602,7 +601,7 @@ ], "description": "A PHP library for rendering the UNL templates", "homepage": "http://wdn.unl.edu/", - "time": "2015-12-15 00:14:04" + "time": "2018-12-12T16:32:30+00:00" }, { "name": "unl/unl_cache_lite", @@ -629,7 +628,7 @@ "source": "https://github.com/unlpear/UNL_Cache_Lite/tree/v0.1.1", "issues": "https://github.com/unlpear/UNL_Cache_Lite/issues" }, - "time": "2014-08-25 20:13:04" + "time": "2014-08-25T20:13:04+00:00" }, { "name": "zaininnari/html-minifier", @@ -680,7 +679,7 @@ "HTML minify", "php" ], - "time": "2015-08-18 14:10:55" + "time": "2015-08-18T14:10:55+00:00" }, { "name": "zendframework/zend-code", @@ -732,7 +731,7 @@ "code", "zf2" ], - "time": "2016-04-20 17:26:42" + "time": "2016-04-20T17:26:42+00:00" }, { "name": "zendframework/zend-eventmanager", @@ -786,7 +785,7 @@ "events", "zf2" ], - "time": "2018-04-25 15:33:34" + "time": "2018-04-25T15:33:34+00:00" } ], "packages-dev": [], diff --git a/config.sample.php b/config.sample.php index 2072e744f9f889587f24ecfd536a44625b0c7ce3..b4af86e67299309683b21c89e71d843e86680eb0 100644 --- a/config.sample.php +++ b/config.sample.php @@ -1,6 +1,10 @@ <?php -global $ENV = 'production'; +global $ENV; +$ENV = 'production'; + +// Set your project lives in a sub-folder of your web root +//$routerBase = '/unl_lockup_factory/public/'; # standard autoloader function autoload($class) diff --git a/less/main.less b/less/main.less index 510d89a913c050b8e878d117e6a13bfba955d4cb..2f178b02d0151854eeb0d0e00293d97ae14afca1 100644 --- a/less/main.less +++ b/less/main.less @@ -1,6 +1,10 @@ @import 'lib/colors'; @import 'lib/fonts'; +a { + text-decoration: none; +} + label > input { /* HIDE RADIO */ visibility: hidden; /* Makes input not-clickable */ position: absolute; /* Remove input from document flow */ @@ -148,7 +152,7 @@ svg.preview { .wdn-hero-heading { z-index: 1; margin: 0; - font-size: 3.923rem; + font-size: 2.67em; text-transform: uppercase; color: #fff; .hero-line { @@ -353,17 +357,17 @@ svg.preview { @media (min-width: 480px) { .wdn-hero-heading { - font-size: 4.1538rem; + font-size: 3.16em; } } @media (min-width: 768px) { .wdn-hero-heading { - font-size: 5.61rem; + font-size: 4.21em; } } @media (min-width: 1044px) { .wdn-hero-heading { - font-size: 5.997rem; + font-size: 4.74em; } } diff --git a/public/css/main.css b/public/css/main.css index 5d8fa0006526ad6ebcca9e48e1fa340f9329bb41..3c7bbe148873ca6fea8ecc32b7dd748e71cddb90 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1 +1 @@ -label>input{visibility:hidden;position:absolute}label img{padding:5px}label>input+img,label>input+img+img{cursor:pointer;box-shadow:0 0 8px #DDD}label>input:checked+img,label>input:checked+img+img{box-shadow:0 0 8px #1B9AE8}form legend{font-size:1.5em}textarea{resize:vertical}.page-title{margin-top:0}div.left,section.left,td.left,th.left{text-align:left}div.center,label.center,section.center,td.center,th.center{text-align:center}div.right,section.right,td.right,th.right{text-align:right}img.height-36{max-height:108px}img.height-38{max-height:114px}img.height-40{max-height:120px}.approval-bug{text-align:center;background:#1b9ae8;border:1px solid #137cbd;border-radius:1em;padding:1em;color:#fefdfa;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;font-weight:400;font-style:normal}.approval-bug.approved{background:#00bc3c;border:1px solid #00892c}.approval-bug.denied{background:#ff5151;border:1px solid #d00000}.wdn_notice{margin-top:1em}.caps{text-transform:uppercase;color:inherit}.featured-icon{background-color:#00BD3C;height:144px;width:144px;border-radius:80px;float:none!important;margin:0 auto!important}.featured-icon.red{background-color:#D00000}.featured-icon.blue{background-color:#1B9AE8}.table-actions{line-height:1}.table-actions a,.table-actions button{vertical-align:middle}.delete-form{display:inline;padding:0}svg.preview{border:2px dashed #DDD;max-width:100%;max-height:100%}.wdn-hero{position:relative;overflow:hidden;height:25.24em;height:42vh;background-color:#000;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.wdn-hero video{width:100%}.wdn-hero-text{position:relative;bottom:auto;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;text-align:center}.wdn-hero-heading{z-index:1;margin:0;font-size:3.923rem;text-transform:uppercase;color:#fff}.wdn-hero-heading .hero-line{display:inline-block;line-height:1;border-top:1px solid rgba(255,255,255,.2);border-bottom:1px solid rgba(255,255,255,.2)}.is-video.wdn-hero .wdn-hero-video{position:absolute;top:0;left:0}.tooltip{background-color:#1B9AE8;border-radius:2em;height:1.5em;width:1.5em;padding:0 .2em;color:#fff;display:inline-block;text-align:center;font-size:.85em;line-height:1.6em;position:relative;font-size:.8125rem}.tooltip>div{position:absolute;display:none;background-color:#fff;color:#000;box-shadow:0 1px 4px rgba(0,0,0,.2);padding:.75em;bottom:160%;left:-91px;width:200px;text-align:left;z-index:250}.tooltip>div:before{background-color:#fff;content:"";display:block;width:15px;height:15px;position:absolute;bottom:-8px;left:50%;margin-left:-7px;transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);box-shadow:0 0 4px rgba(0,0,0,.25)}.tooltip>div:after{content:"";height:12px;width:40px;background-color:#fff;display:block;position:absolute;bottom:0;left:50%;margin-left:-24px}.tooltip.hang-right>div{left:-27px}.tooltip.hang-left>div{left:-157px}.tooltip.hang-right>div:before{left:34px;margin-left:-7px}.tooltip.hang-right>div:after{left:34px;margin-left:-24px}.tooltip.hang-left>div:before{left:166px;margin-left:-7px}.tooltip.hang-left>div:after{left:166px;margin-left:-24px}.tooltip ul li{margin-bottom:.75em}.tooltip span.heading{font-family:"Tungsten A","Tungsten B",HelveticaNeueCondensed,HelveticaNeue-Condensed,"Helvetica Neue Condensed",HelveticaNeueRomanCondensed,HelveticaNeue-Roman-Condensed,"Helvetica Neue Roman Condensed","Arial Narrow",HelveticaNeue,"Helvetica Neue",HelveticaNeueRoman,HelveticaNeue-Roman,"Helvetica Neue Roman",Helvetica,Tahoma,Geneva,Arial,sans-serif;font-size:1.777em}.tooltip:hover>div{display:block}.tooltip p{margin:0}.tooltip.italic *{font-style:italic}.toolbox,.visual-island{background:#f9f8f5;margin-bottom:1em;word-wrap:break-word;padding:0!important}.toolbox .details,.toolbox .tools,.visual-island .details,.visual-island .tools{padding:1em;border-left:1px solid #d5d5d2;border-right:1px solid #d5d5d2;border-bottom:1px solid #d5d5d2}.toolbox .details.top-border,.toolbox .tools.top-border,.visual-island .details.top-border,.visual-island .tools.top-border{border-top:1px solid #d5d5d2}.toolbox .vi-header,.toolbox h1,.toolbox h2,.toolbox h3,.toolbox h4,.toolbox h5,.toolbox h6,.visual-island .vi-header,.visual-island h1,.visual-island h2,.visual-island h3,.visual-island h4,.visual-island h5,.visual-island h6{display:block;font-size:.802em!important;margin:0;border-bottom:1px solid #474746;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;width:100%;background-color:#474746;padding:1em;text-transform:uppercase;color:#fff;font-weight:400;font-style:normal;text-align:center}.toolbox p,.visual-island p{padding:0 1em 1em 1em}.toolbox ul,.visual-island ul{padding:0;padding-left:1em;margin:0}.toolbox ul a,.visual-island ul a{border-bottom:none;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif}@media (min-width:0px){.wdn-hero{height:5em;height:10vh;max-height:8em}}@media (min-height:480px) and (min-width:480px){.wdn-hero{height:15em;height:30vh;max-height:22em}}@media (min-height:718px) and (min-width:960px){.wdn-hero{height:25.24em;height:56vh;max-height:31.474em}}@media (min-height:895px) and (min-width:1044px){.wdn-hero{height:31.474em;height:75vh;max-height:33.645em}}@media (min-width:480px){.wdn-hero-heading{font-size:4.1538rem}}@media (min-width:768px){.wdn-hero-heading{font-size:5.61rem}}@media (min-width:1044px){.wdn-hero-heading{font-size:5.997rem}} \ No newline at end of file +a{text-decoration:none}label>input{visibility:hidden;position:absolute}label img{padding:5px}label>input+img,label>input+img+img{cursor:pointer;box-shadow:0 0 8px #DDD}label>input:checked+img,label>input:checked+img+img{box-shadow:0 0 8px #1B9AE8}form legend{font-size:1.5em}textarea{resize:vertical}.page-title{margin-top:0}div.left,section.left,td.left,th.left{text-align:left}div.center,label.center,section.center,td.center,th.center{text-align:center}div.right,section.right,td.right,th.right{text-align:right}img.height-36{max-height:108px}img.height-38{max-height:114px}img.height-40{max-height:120px}.approval-bug{text-align:center;background:#1b9ae8;border:1px solid #137cbd;border-radius:1em;padding:1em;color:#fefdfa;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;font-weight:400;font-style:normal}.approval-bug.approved{background:#00bc3c;border:1px solid #00892c}.approval-bug.denied{background:#ff5151;border:1px solid #d00000}.wdn_notice{margin-top:1em}.caps{text-transform:uppercase;color:inherit}.featured-icon{background-color:#00BD3C;height:144px;width:144px;border-radius:80px;float:none!important;margin:0 auto!important}.featured-icon.red{background-color:#D00000}.featured-icon.blue{background-color:#1B9AE8}.table-actions{line-height:1}.table-actions a,.table-actions button{vertical-align:middle}.delete-form{display:inline;padding:0}svg.preview{border:2px dashed #DDD;max-width:100%;max-height:100%}.wdn-hero{position:relative;overflow:hidden;height:25.24em;height:42vh;background-color:#000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.wdn-hero video{width:100%}.wdn-hero-text{position:relative;bottom:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;text-align:center}.wdn-hero-heading{z-index:1;margin:0;font-size:2.67em;text-transform:uppercase;color:#fff}.wdn-hero-heading .hero-line{display:inline-block;line-height:1;border-top:1px solid rgba(255,255,255,.2);border-bottom:1px solid rgba(255,255,255,.2)}.is-video.wdn-hero .wdn-hero-video{position:absolute;top:0;left:0}.tooltip{background-color:#1B9AE8;border-radius:2em;height:1.5em;width:1.5em;padding:0 .2em;color:#fff;display:inline-block;text-align:center;font-size:.85em;line-height:1.6em;position:relative;font-size:.8125rem}.tooltip>div{position:absolute;display:none;background-color:#fff;color:#000;box-shadow:0 1px 4px rgba(0,0,0,.2);padding:.75em;bottom:160%;left:-91px;width:200px;text-align:left;z-index:250}.tooltip>div:before{background-color:#fff;content:"";display:block;width:15px;height:15px;position:absolute;bottom:-8px;left:50%;margin-left:-7px;transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);box-shadow:0 0 4px rgba(0,0,0,.25)}.tooltip>div:after{content:"";height:12px;width:40px;background-color:#fff;display:block;position:absolute;bottom:0;left:50%;margin-left:-24px}.tooltip.hang-right>div{left:-27px}.tooltip.hang-left>div{left:-157px}.tooltip.hang-right>div:before{left:34px;margin-left:-7px}.tooltip.hang-right>div:after{left:34px;margin-left:-24px}.tooltip.hang-left>div:before{left:166px;margin-left:-7px}.tooltip.hang-left>div:after{left:166px;margin-left:-24px}.tooltip ul li{margin-bottom:.75em}.tooltip span.heading{font-family:"Tungsten A","Tungsten B",HelveticaNeueCondensed,HelveticaNeue-Condensed,"Helvetica Neue Condensed",HelveticaNeueRomanCondensed,HelveticaNeue-Roman-Condensed,"Helvetica Neue Roman Condensed","Arial Narrow",HelveticaNeue,"Helvetica Neue",HelveticaNeueRoman,HelveticaNeue-Roman,"Helvetica Neue Roman",Helvetica,Tahoma,Geneva,Arial,sans-serif;font-size:1.777em}.tooltip:hover>div{display:block}.tooltip p{margin:0}.tooltip.italic *{font-style:italic}.toolbox,.visual-island{background:#f9f8f5;margin-bottom:1em;word-wrap:break-word;padding:0!important}.toolbox .details,.toolbox .tools,.visual-island .details,.visual-island .tools{padding:1em;border-left:1px solid #d5d5d2;border-right:1px solid #d5d5d2;border-bottom:1px solid #d5d5d2}.toolbox .details.top-border,.toolbox .tools.top-border,.visual-island .details.top-border,.visual-island .tools.top-border{border-top:1px solid #d5d5d2}.toolbox .vi-header,.toolbox h1,.toolbox h2,.toolbox h3,.toolbox h4,.toolbox h5,.toolbox h6,.visual-island .vi-header,.visual-island h1,.visual-island h2,.visual-island h3,.visual-island h4,.visual-island h5,.visual-island h6{display:block;font-size:.802em!important;margin:0;border-bottom:1px solid #474746;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;width:100%;background-color:#474746;padding:1em;text-transform:uppercase;color:#fff;font-weight:400;font-style:normal;text-align:center}.toolbox p,.visual-island p{padding:0 1em 1em 1em}.toolbox ul,.visual-island ul{padding:0;padding-left:1em;margin:0}.toolbox ul a,.visual-island ul a{border-bottom:none;font-family:"Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif}@media (min-width:0px){.wdn-hero{height:5em;height:10vh;max-height:8em}}@media (min-height:480px) and (min-width:480px){.wdn-hero{height:15em;height:30vh;max-height:22em}}@media (min-height:718px) and (min-width:960px){.wdn-hero{height:25.24em;height:56vh;max-height:31.474em}}@media (min-height:895px) and (min-width:1044px){.wdn-hero{height:31.474em;height:75vh;max-height:33.645em}}@media (min-width:480px){.wdn-hero-heading{font-size:3.16em}}@media (min-width:768px){.wdn-hero-heading{font-size:4.21em}}@media (min-width:1044px){.wdn-hero-heading{font-size:4.74em}} \ No newline at end of file diff --git a/public/index.php b/public/index.php index d3798e83c8b2acb1949401ea85d000710dc29457..f81aae1010982b543a1bdec7354dfb906027e796 100644 --- a/public/index.php +++ b/public/index.php @@ -18,6 +18,10 @@ session_start(); \Auth::setUser(); $router = new AltoRouter(); +if (isset($routerBase) && !empty($routerBase)) { + $router->setBasePath($routerBase); +} + $router->map('GET', '/?', function() { \Core::callController('home', 'view'); }); diff --git a/src/Controllers/Controller.php b/src/Controllers/Controller.php index c911316f1c5be9660a8d6e2848ee36f8a8703fd5..aabfd2bf955a567f27147ac0a30f1569a4b60074 100644 --- a/src/Controllers/Controller.php +++ b/src/Controllers/Controller.php @@ -1,6 +1,7 @@ <?php namespace Controllers; use Auth; +use Models\ScriptState as ScriptState; class Controller { public static $views_directory = __DIR__ . '/../Views'; @@ -11,9 +12,14 @@ class Controller { const NOTICE_LEVEL_ALERT = 'alert'; public static function renderView($view, \stdClass $context) { + $context->scriptState = new ScriptState; + $context->baseURL = "/"; + if (isset($GLOBALS['routerBase']) && !empty($GLOBALS['routerBase'])) { + $context->baseURL = $GLOBALS['routerBase']; + } ob_start(); include self::$views_directory . '/' . $view . '.php'; - return ob_get_clean(); + return new ControllerOutput(ob_get_clean(), $context); } public static function flashNotice($level, $header, $message) @@ -32,4 +38,34 @@ class Controller { public static function requireAuth() { \Auth::authenticate(); } +} + +class ControllerOutput { + private $baseURL = "/"; + private $content; + private $scriptState; + + public function __construct($content, $context) + { + // set base url from index.php global scope + if (isset($GLOBALS['routerBase']) && !empty($GLOBALS['routerBase'])) { + $this->baseURL = $GLOBALS['routerBase']; + } + $this->content = $content; + if (!empty($context->scriptState) && $context->scriptState instanceof ScriptState) { + $this->scriptState = $context->scriptState; + } + } + + public function getBaseURL() { + return $this->baseURL; + } + + public function getContent() { + return $this->content; + } + + public function getScriptState() { + return $this->scriptState; + } } \ No newline at end of file diff --git a/src/Core.php b/src/Core.php index 45a601c3b4d38f79d007b9f410943ab9a02e8c0f..058a6dc128597f343f54fc774951496ed2d5f62b 100644 --- a/src/Core.php +++ b/src/Core.php @@ -11,7 +11,6 @@ class Core { public static function callController($controller, $action, $params = NULL) { $controller_name = 'Controllers\\' . ucfirst($controller) . 'Controller'; $action_name = $action . 'Action'; - # if that controller exists and it has that method, call it $controller_filename = __DIR__ . '/' . str_replace(array('_', '\\'), '/', $controller_name) . '.php'; if (file_exists($controller_filename) && is_callable($controller_name.'::'.$action_name)) { @@ -23,7 +22,7 @@ class Core { } } - public static function renderPage($main_content) { + public static function renderPage(Controllers\ControllerOutput $controllerOutput) { include __DIR__ . '/Views/main_template.php'; } diff --git a/src/Models/ScriptState.php b/src/Models/ScriptState.php new file mode 100644 index 0000000000000000000000000000000000000000..4edfbb9375baf8dac53946c78b1175cf85fd15ca --- /dev/null +++ b/src/Models/ScriptState.php @@ -0,0 +1,81 @@ +<?php +namespace Models; + +class ScriptState { + private $scriptDeclarations = array(); + private $scripts = array(); + + public function loadScriptDeclaration($content, $type = '', $appendToHead = FALSE) { + $this->scriptDeclarations[] = new ScriptDeclaration($content, $type, $appendToHead); + } + + public function applyScriptDeclarations(&$page) { + foreach ($this->scriptDeclarations as $declaration){ + if ($declaration instanceof ScriptDeclaration) { + $page->addScriptDeclaration($declaration->content(), $declaration->type() , $declaration->appendToHead()); + } + } + } + + public function loadScript($url, $type = '', $appendToHead = FALSE) { + $this->scripts[] = new Script($url, $type, $appendToHead); + } + + public function applyScripts(&$page) { + foreach ($this->scripts as $script){ + if ($script instanceof Script) { + $page->addScript($script->url(), $script->type() , $script->appendToHead()); + } + } + } +} + +class ScriptDeclaration { + private $content; + private $type; + private $appendToHead; + + public function __construct($content, $type = '', $appendToHead = FALSE) + { + $this->content = $content; + $this->type = $type; + $this->appendToHead = ($appendToHead === TRUE); + } + + public function content() { + return $this->content; + } + + public function type() { + return $this->type; + } + + public function appendToHead() { + return $this->appendToHead; + } +} + +class Script { + private $url; + private $type; + private $appendToHead; + + public function __construct($url, $type = '', $appendToHead = FALSE) + { + $this->url = $url; + $this->type = $type; + $this->appendToHead = ($appendToHead === TRUE); + } + + public function url() { + return $this->url; + } + + public function type() { + return $this->type; + } + + public function appendToHead() { + return $this->appendToHead; + } +} \ No newline at end of file diff --git a/src/Views/download_lockup_files.php b/src/Views/download_lockup_files.php index 11d806aa211c29ea4a37a6531d260a63ee813ffd..067973710fa613226b9cec9faffa8e939108f281 100644 --- a/src/Views/download_lockup_files.php +++ b/src/Views/download_lockup_files.php @@ -1,7 +1,7 @@ -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Your files for "<?php echo $context->lockup->getName(); ?>" Lockup</h3> - <div class="wdn-center"> + <div class="dcf-txt-center"> <div class="center"> <img src="<?php echo $context->lockup->getPNGDownloadURL() ?>"> </div> diff --git a/src/Views/home.php b/src/Views/home.php index 201e31742cd360f824bbaebc7ae459473ca5e012..8d9ba6aaaf181eb8b4dfa8299e62d22b06b0ee26 100644 --- a/src/Views/home.php +++ b/src/Views/home.php @@ -1,5 +1,5 @@ -<div class="wdn-band"> - <section class="wdn-band wdn-hero is-video center"> +<div class="dcf-bleed"> + <section class="wdn-hero is-video center"> <video class="wdn-hero-video" autoplay="" loop="" poster="features/2016-spring-break-service/hero/2016-spring-break-service-md-min.jpg"> <source src="/videos/factory_milling.mp4"> </video> @@ -11,28 +11,28 @@ </section> </div> -<div class="wdn-band wdn-light-complement-band"> - <div class="wdn-inner-wrapper"> - <div class="bp2-wdn-grid-set-halves wdn-center"> - <div class="wdn-col" style="margin-bottom: 10px;"> +<div class="dcf-bleed unl-bg-light-gray dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw dcf-txt-center"> + <div style="margin-bottom: 10px;"> <a href="/lockups/create/"> <div class="featured-icon" style="padding-top: 0px; color: white;"> <span style="font-size: 84px; font-weight: 900;">+</span> </div> - <h2 class="wdn-brand caps" style="margin-top: 1em">Create New Lockup</h2> + <h2 class="caps" style="margin-top: 1em">Create New Lockup</h2> </a> <p style="font-style: italic;"> Bring your ideas for lockups, and we'll give you the styles to choose from. </p> </div> - <div class="wdn-col" style="margin-bottom: 10px;"> + <div style="margin-bottom: 10px;"> <a href="/lockups/manage/"> <div class="featured-icon blue" style="padding-top: 48px;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="51.205px" height="51.205px" viewBox="0 0 51.205 51.205" enable-background="new 0 0 51.205 51.205" xml:space="preserve"> <path fill="#FFFFFF" d="M50.264,20.5h-6.307c-0.418-1.476-1.019-2.944-1.742-4.242l4.46-4.46c0.159-0.16,0.249-0.375,0.249-0.601 s-0.09-0.442-0.249-0.602L40.608,4.53c-0.333-0.332-0.871-0.332-1.203,0l-4.464,4.463c-1.347-0.723-3.108-1.413-4.236-1.749V0.942 c0-0.471-0.38-0.851-0.851-0.851H21.35c-0.47,0-0.85,0.38-0.85,0.851v6.307c-1.15,0.343-2.88,1.012-4.236,1.745L11.798,4.53 c-0.333-0.332-0.87-0.332-1.202,0l-6.066,6.065c-0.332,0.332-0.332,0.871,0,1.203l4.466,4.467c-0.716,1.334-1.383,3.068-1.739,4.235 H0.942c-0.47,0-0.851,0.38-0.851,0.85v6.804c0,0.47,0.381,0.849,0.851,0.849h6.227c0.369,2.213,1.047,4.411,1.83,5.933l-4.471,4.471 c-0.16,0.159-0.249,0.376-0.249,0.602c0,0.227,0.089,0.441,0.249,0.602l6.067,6.066c0.32,0.32,0.884,0.318,1.202,0l4.471-4.474 c0.978,0.499,2.165,0.914,3.152,1.262c0.398,0.141,0.781,0.276,1.079,0.391v6.41c0,0.47,0.38,0.85,0.85,0.85h8.504 c0.471,0,0.851-0.38,0.851-0.85v-6.41c0.298-0.116,0.683-0.25,1.082-0.393c0.986-0.346,2.17-0.761,3.147-1.259l4.475,4.473 c0.33,0.331,0.869,0.331,1.201,0l6.065-6.066c0.332-0.333,0.332-0.87,0-1.203l-4.451-4.452c0.785-1.312,1.419-2.624,1.836-5.951 h6.204c0.471,0,0.851-0.379,0.851-0.849V21.35C51.114,20.88,50.734,20.5,50.264,20.5z M25.603,34.107 c-4.688,0-8.503-3.816-8.503-8.505c0-4.688,3.815-8.503,8.503-8.503s8.505,3.815,8.505,8.503 C34.107,30.291,30.291,34.107,25.603,34.107z"/> </svg> </div> - <h2 class="wdn-brand caps" style="margin-top: 1em">Manage Lockups</h2> + <h2 class="caps" style="margin-top: 1em">Manage Lockups</h2> </a> <p style="font-style: italic;"> Manage and download your submitted and approved lockups. @@ -42,8 +42,8 @@ </div> </div> -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h2>Using the Power of the Nebraska N</h2> <p> Part of the goal of every University communication, regardless of the audience, is to @@ -54,10 +54,10 @@ </div> </div> -<div class="wdn-band wdn-light-triad-band"> - <div class="wdn-inner-wrapper right"> +<div class="dcf-bleed unl-bg-lighter-gray dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper right"> <h2>What is an “Icon Lockup?"</h2> - <div class="wdn-grid"> + <div> <p> An icon lockup combines the University's “Nebraska N" icon with text describing a university department or unit into one scalable image. This allows the text to be "locked in" to the correct position and size @@ -70,8 +70,8 @@ </div> </div> -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <div class="center" style="width: 70%; margin: 0 auto;"> <h2>How do I begin?</h2> <p> diff --git a/src/Views/localfooter.php b/src/Views/localfooter.php index fe47988192d079e45e810b525bf1ef88438d4eab..919173db6f0a654c3282aa9feb2fff841bdb7200 100644 --- a/src/Views/localfooter.php +++ b/src/Views/localfooter.php @@ -1,19 +1,14 @@ -<div class="wdn-grid-set wdn-footer-links-local"> - <div class="bp960-wdn-col-two-thirds"> - <div class="wdn-footer-module"> - <span role="heading" class="wdn-footer-heading">About UNL Lockup Factory</span> - <p>This application is developed and maintained by <a href="http://iim.unl.edu/">Internet and Interactive Media</a> (IIM), which is a partnership with University Communication and Information Technology Services.</p> - </div> - </div> - <div class="bp960-wdn-col-one-third"> - <div class="wdn-footer-module"> - <span role="heading" class="wdn-footer-heading">Related Links</span> - <ul class="wdn-related-links-v1"> - <li><a href="http://ucomm.unl.edu/">University Communication</a></li> - <li><a href="http://iim.unl.edu/">Internet and Interactive Media</a></li> - <li><a href="http://wdn.unl.edu/">Web Developer Network</a></li> - <li><a href="http://its.unl.edu/">Information Technology Services</a></li> - </ul> - </div> - </div> -</div> +<nav id="dcf-footer-group-1" role="navigation" aria-labelledby="dcf-footer-group-1-heading"> + <h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-1-heading">About UNL Lockup Factory</h3> + <p>This application is developed and maintained by <a href="http://iim.unl.edu/">Internet and Interactive Media</a> (IIM), which is a partnership with University Communication and Information Technology Services.</p> + +</nav> +<nav id="dcf-footer-group-2" role="navigation" aria-labelledby="dcf-footer-group-2-heading"> + <h3 class="dcf-txt-md dcf-bold dcf-uppercase dcf-lh-3 unl-ls-2 unl-cream" id="dcf-footer-group-2-heading">Related Links</h3> + <ul class="dcf-list-bare dcf-mb-0"> + <li><a href="http://ucomm.unl.edu/">University Communication</a></li> + <li><a href="http://iim.unl.edu/">Internet and Interactive Media</a></li> + <li><a href="http://wdn.unl.edu/">Web Developer Network</a></li> + <li><a href="http://its.unl.edu/">Information Technology Services</a></li> + </ul> +</nav> diff --git a/src/Views/lockup_library.php b/src/Views/lockup_library.php index 40ee58e40f3ee239c5f37ea3921fceefab0ea8ea..9c8b8cf239e1fb643c3e544a28e65c312a36c935 100644 --- a/src/Views/lockup_library.php +++ b/src/Views/lockup_library.php @@ -1,23 +1,23 @@ <style> -svg { +#dcf-main svg { min-height: 100px; min-width: 200px; } </style> -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Lockup Library</h3> <form> <input style="width: auto;" value="<?php echo $context->search_term ?>" type="text" placeholder="Search..." name="search_term"> - <button type="submit" class="wdn-button wdn-button-triad">Search</button> + <button type="submit" class="dcf-btn wdn-button-triad">Search</button> <?php if (!empty($context->search_term)): ?> - <button id="clear-search" class="wdn-button wdn-button" type="button">×</button> + <button id="clear-search" class="dcf-btn dcf-btn-primary" type="button">×</button> <?php endif; ?> </form> <br> <?php foreach ($context->lockups as $chunk): ?> - <h4 class="wdn-brand">Lockups Approved For <?php echo $chunk[0]->approver == '' ? '(unknown)' : $chunk[0]->approver->organization ?></h4> + <h4>Lockups Approved For <?php echo $chunk[0]->approver == '' ? '(unknown)' : $chunk[0]->approver->organization ?></h4> <table> <thead> <tr> @@ -39,12 +39,13 @@ svg { </div> </div> -<script type="text/javascript"> +<?php +$context->scriptState->loadScriptDeclaration(" require(['jquery'], function ($) { $(document).ready(function () { $('#clear-search').click(function (click) { window.location = window.location.href.split('?')[0]; }); }); -}); -</script> \ No newline at end of file +});"); +?> \ No newline at end of file diff --git a/src/Views/main_template.php b/src/Views/main_template.php index 13763cb8fcfeb3293d574337a31f2393b2e578a9..24528920de7d6e38668938366aed2132aa68c07f 100644 --- a/src/Views/main_template.php +++ b/src/Views/main_template.php @@ -1,49 +1,41 @@ <?php use UNL\Templates\Templates; -$page = Templates::factory('Fixed', Templates::VERSION_4_1); +$page = Templates::factory('App', Templates::VERSION_5); # this should be the server root, that is, the public directory of where static files come from. -# the templates library will stick /wdn/templates_4.1 on there for you +# the templates library will stick /wdn/templates_5.0 on there for you $wdn_include_path = \Core::ROOT . '/public'; -if (file_exists($wdn_include_path)) { +if (file_exists($wdn_include_path . '/wdn/templates_5.0')) { $page->setLocalIncludePath($wdn_include_path); } +$baseURL = '/'; +$appControlURL = ''; + +// Hacks for when in dev env uncomment but don't commit +// TODO: Make app dev friendly +//$baseURL = $controllerOutput->getBaseURL(); +//$appControlURL = $baseURL; + # Document titles $page->doctitle = '<title>UNL Lockup Factory</title>'; -$page->titlegraphic = 'UNL Lockup Factory'; -$page->pagetitle = ''; +$page->titlegraphic = '<a class="dcf-txt-h5" href="' . $baseURL . '">UNL Lockup Factory</a>'; $page->affiliation = '<a href="http://ucomm.unl.edu">University Communication</a>'; # css -$page->addStyleSheet('/css/main.css'); +$page->addStyleSheet($baseURL . 'css/main.css'); # javascript -$page->head .= '<script type="text/javascript">WDN.setPluginParam("idm", "logout", "/logout/");</script>' . PHP_EOL; -$page->head .= '<script type="text/javascript">WDN.initializePlugin("notice");</script>' . PHP_EOL; - -# other - -# breadcrumbs -$page->breadcrumbs = '<ul>'; -foreach (\Core::$breadcrumbs as $crumb) { - $page->breadcrumbs .= '<li>'; - if (!empty($crumb['href'])) { - $page->breadcrumbs .= '<a href="' . $crumb['href'] . '">' . $crumb['text'] . '</a>'; - } else { - $page->breadcrumbs .= $crumb['text']; - } - $page->breadcrumbs .= '</li>'; -} -$page->breadcrumbs .= '</ul>'; +$page->addScriptDeclaration('WDN.setPluginParam("idm", "logout", "/logout/");'); +$page->addScriptDeclaration('WDN.initializePlugin("notice");'); # navigation -$page->navlinks = ' +$page->appcontrols = ' <ul> -<li><a href="/lockups/create/">New Lockup</a></li> -<li><a href="/lockups/manage/">Manage Lockups</a></li> -<li><a href="/lockups/library/">Lockup Library</a></li> +<li><a href="' . $appControlURL . '/lockups/create/">New Lockup</a></li> +<li><a href="' . $appControlURL . '/lockups/manage/">Manage Lockups</a></li> +<li><a href="' . $appControlURL . '/lockups/library/">Lockup Library</a></li> </ul>' ; @@ -86,13 +78,18 @@ if (($notice = \Core::getNotice()) != NULL) { </div> '; } -$page->maincontentarea .= $main_content; +$page->maincontentarea .= $controllerOutput->getContent(); +$scriptState = $controllerOutput->getScriptState(); +if ($scriptState instanceof \Models\ScriptState) { + $scriptState->applyScripts($page); + $scriptState->applyScriptDeclarations($page); +} # set footer ob_start(); include \Core::ROOT . '/src/Views/localfooter.php'; -$page->leftcollinks = ob_get_clean(); +$page->contactinfo = ob_get_clean(); # echo everything echo $page; diff --git a/src/Views/manage_lockups.php b/src/Views/manage_lockups.php index 90965d4bcc6faf030dc4ae3f975a6aaabf9dba90..efdd5375c4085a57085e61250adcbdb3b4747133 100644 --- a/src/Views/manage_lockups.php +++ b/src/Views/manage_lockups.php @@ -28,22 +28,22 @@ $str = '?'; return $str . implode('&', array_map('outputParam', array_keys($array), $array)); } + + // TODO: No 5.0 pagination css, so using 4.1 + $context->scriptState->loadScriptDeclaration("WDN.loadCSS('https://unlcms.unl.edu/wdn/templates_4.1/css/modules/pagination.css');"); ?> -<script type="text/javascript"> -WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); -</script> -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Manage Lockups</h3> <form> <input style="width: auto;" value="<?php echo $context->search_term ?>" type="text" placeholder="Search..." name="search_term"> - <button type="submit" class="wdn-button wdn-button-triad">Search</button> + <button type="submit" class="dcf-btn wdn-button-triad">Search</button> <?php if (!empty($context->search_term)): ?> - <button id="clear-search" class="wdn-button wdn-button" type="button">×</button> + <button id="clear-search" class="dcf-btn dcf-btn-primary" type="button">×</button> <?php endif; ?> </form> <?php if (\Auth::$current_user->isAdmin()): ?> - <h4 class="wdn-brand">All Lockups</h4> + <h4>All Lockups</h4> <table> <thead> <tr> @@ -69,22 +69,22 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); <td><?php echo $lockup->version; ?></td> <td class="table-actions right" style="min-width: 250px;"> <?php if ($lockup->isEditable()): ?> - <a class="wdn-button wdn-button-triad" href="<?php echo $lockup->getEditURL(); ?>">Edit</a> + <a class="dcf-btn wdn-button-triad" href="<?php echo $lockup->getEditURL(); ?>">Edit</a> <?php endif; ?> <?php if ($lockup->isGenerated() && $lockup->isPublished()): ?> <form action="<?php echo $lockup->getUnpublishURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button">Unpublish</button> + <button type="submit" class="dcf-btn">Unpublish</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> <?php endif; ?> <?php if ($lockup->isGenerated() && !$lockup->isPublished()): ?> <form action="<?php echo $lockup->getPublishURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button wdn-button-complement">Publish</button> + <button type="submit" class="dcf-btn wdn-button-complement">Publish</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> <?php endif; ?> <form action="<?php echo $lockup->getDeleteURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button wdn-button-brand">Delete</button> + <button type="submit" class="dcf-btn dcf-btn-primary">Delete</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> </td> @@ -123,7 +123,7 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); <?php endif; ?> <?php else: ?> <?php if (\Auth::$current_user->isApprover()): ?> - <h4 class="wdn-brand">Lockups Needing Communicator Approval</h4> + <h4>Lockups Needing Communicator Approval</h4> <table> <thead> <tr> @@ -176,7 +176,7 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); <br> <?php endif; ?> <?php if (\Auth::$current_user->isCreative()): ?> - <h4 class="wdn-brand">Lockups Needing Creative Approval</h4> + <h4>Lockups Needing Creative Approval</h4> <table> <thead> <tr> @@ -228,7 +228,7 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); <?php endif; ?> <br> <?php endif; ?> - <h4 class="wdn-brand">My Lockups</h4> + <h4>My Lockups</h4> <table> <thead> <tr> @@ -246,22 +246,22 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); <td><?php echo $lockup->getFullStatusText(); ?></td> <td class="table-actions right" style="min-width: 200px;"> <?php if ($lockup->isEditable()): ?> - <a class="wdn-button wdn-button-triad" href="<?php echo $lockup->getEditURL(); ?>">Edit</a> + <a class="dcf-btn wdn-button-triad" href="<?php echo $lockup->getEditURL(); ?>">Edit</a> <?php endif; ?> <?php if ($lockup->isGenerated() && $lockup->isPublished()): ?> <form action="<?php echo $lockup->getUnpublishURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button">Unpublish</button> + <button type="submit" class="dcf-btn">Unpublish</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> <?php endif; ?> <?php if ($lockup->isGenerated() && !$lockup->isPublished()): ?> <form action="<?php echo $lockup->getPublishURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button wdn-button-complement">Publish</button> + <button type="submit" class="dcf-btn wdn-button-complement">Publish</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> <?php endif; ?> <form action="<?php echo $lockup->getDeleteURL(); ?>" method="POST" class="delete-form"> - <button type="submit" class="wdn-button wdn-button-brand">Delete</button> + <button type="submit" class="dcf-btn dcf-btn-primary">Delete</button> <input type="hidden" name="id" value="<?php echo $lockup->id ?>"> </form> </td> @@ -303,12 +303,13 @@ WDN.loadCSS(WDN.getTemplateFilePath('css/modules/pagination.css')); </div> </div> -<script type="text/javascript"> +<?php +$context->scriptState->loadScriptDeclaration(" require(['jquery'], function ($) { $(document).ready(function () { $('#clear-search').click(function (click) { window.location = window.location.href.split('?')[0]; }); }); -}); -</script> \ No newline at end of file +});"); +?> \ No newline at end of file diff --git a/src/Views/new_lockup.php b/src/Views/new_lockup.php index f00df491b8d7cf1827d08c7189b58a486acc6b5b..289d5ceeb81263f9d5a83c8ebd1ca006ff9886cd 100644 --- a/src/Views/new_lockup.php +++ b/src/Views/new_lockup.php @@ -1,173 +1,172 @@ -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Create New Lockup</h3> <form id="create-lockup" method="POST" action=""> <input type="hidden" id="id" name="id" value="<?php echo $context->lockup->id; ?>"> <?php if (\Auth::$current_user === NULL): ?> <fieldset> - <legend>Login</legend> - <div><label>We'll need you to login to your My.UNL account before creating a lockup.</label></div> - <a class="wdn-button wdn-button-brand" href="https://shib.unl.edu/idp/profile/cas/login?service=<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">Login</a> + <legend class="dcf-legend">Login</legend> + <div><label class="dcf-label">We'll need you to login to your My.UNL account before creating a lockup.</label></div> + <a class="dcf-btn dcf-btn-primary" href="https://shib.unl.edu/idp/profile/cas/login?service=<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">Login</a> </fieldset> <?php endif; ?> - <fieldset> - <legend>Style</legend> + <fieldset class="dcf-pb-4"> + <legend class="dcf-legend">Style</legend> <div> - <input type="radio" id="show-horiz" name="show" checked="checked"><label for="show-horiz">Show Horizontal</label> - - <input type="radio" id="show-vert" name="show"><label for="show-vert">Show Vertical</label> + <input class="dcf-input-control" type="radio" id="show-horiz" name="show" checked="checked"><label class="dcf-label" for="show-horiz">Show Horizontal</label> + <input class="dcf-input-control" type="radio" id="show-vert" name="show"><label class="dcf-label" for="show-vert">Show Vertical</label> </div> <br> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_only" id="type-org-only" <?php if ($context->lockup->style == 'org_only' || empty($context->lockup->style)) echo 'checked="checked"'; ?>> - <img class="horiz height-36" src="/images/org_only_example.png"> - <img class="vert" style="display: none;" src="/images/org_only_vert_example.png"> + <img class="horiz height-36" src="<?php echo $context->baseURL; ?>images/org_only_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_only_vert_example.png"> </label><br> - <label for="type-org-only"> + <label for="type-org-only" class="dcf-label"> Primary ID lockup (A): primary hierarchy for your full College, Department, Unit or Subject name in a single line design. </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_two_line" id="type-org-two-line" <?php if ($context->lockup->style == 'org_two_line') echo 'checked="checked"'; ?>> - <img class="horiz height-36" src="/images/org_two_line_example.png"> - <img class="vert" style="display: none;" src="/images/org_two_line_vert_example.png"> + <img class="horiz height-36" src="<?php echo $context->baseURL; ?>images/org_two_line_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_two_line_vert_example.png"> </label><br> - <label for="type-org-two-line"> + <label for="type-org-two-line" class="dcf-label"> Primary ID lockup (B): primary hierarchy for your full College, Department, Unit or Subject name in a two-line design. <br><em>*Additional line should be used when ID is too long to fit on one line.</em> </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_subject" id="type-org-subject" <?php if ($context->lockup->style == 'org_subject') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/org_subject_example.png"> - <img class="vert" style="display: none;" src="/images/org_subject_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/org_subject_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_subject_vert_example.png"> </label><br> - <label for="type-org-subject"> + <label for="type-org-subject" class="dcf-label"> Primary and Secondary ID lockup (A): primary and secondary hierarchy for your full College, Department, Unit or Subject name in a single line design. </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_subject_1_2" id="type-org-subject-1-2" <?php if ($context->lockup->style == 'org_subject_1_2') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/org_subject_1-2_example.png"> - <img class="vert" style="display: none;" src="/images/org_subject_1-2_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/org_subject_1-2_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_subject_1-2_vert_example.png"> </label><br> - <label for="type-org-subject-1-2"> + <label for="type-org-subject-1-2" class="dcf-label"> Primary and Secondary ID lockup (B): primary hierarchy for your full College, Department, Unit or Subject name in one line and secondary hierarchy in a two-line design. <br><em>*Additional line should be used when ID is too long to fit on one line.</em> </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_subject_2_1" id="type-org-subject-2-1" <?php if ($context->lockup->style == 'org_subject_2_1') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/org_subject_2-1_example.png"> - <img class="vert" style="display: none;" src="/images/org_subject_2-1_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/org_subject_2-1_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_subject_2-1_vert_example.png"> </label><br> - <label for="type-org-subject-2-1"> + <label for="type-org-subject-2-1" class="dcf-label"> Primary and Secondary ID lockup (C): primary hierarchy for your full College, Department, Unit or Subject name in two lines and secondary hierarchy in a single line design. <br><em>*Additional line should be used when ID is too long to fit on one line.</em> </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="org_subject_2_2" id="type-org-subject-2-2" <?php if ($context->lockup->style == 'org_subject_2_2') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/org_subject_2-2_example.png"> - <img class="vert" style="display: none;" src="/images/org_subject_2-2_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/org_subject_2-2_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/org_subject_2-2_vert_example.png"> </label><br> - <label for="type-org-subject-2-2"> + <label for="type-org-subject-2-2" class="dcf-label"> Primary and Secondary ID lockup (D): primary hierarchy for your full College, Department, Unit or Subject name in two lines and secondary hierarchy in a two-line design. <br><em>*Additional line should be used when ID is too long to fit on one line.</em> </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="acronym" id="type-acronym" <?php if ($context->lockup->style == 'acronym') echo 'checked="checked"'; ?>> - <img class="horiz height-36" src="/images/acronym_example.png"> - <img class="vert" style="display: none;" src="/images/acronym_vert_example.png"> + <img class="horiz height-36" src="<?php echo $context->baseURL; ?>images/acronym_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/acronym_vert_example.png"> </label><br> - <label for="type-acronym"> + <label for="type-acronym" class="dcf-label"> Merchandise lockup* (A): primary hierarchy for the shorthand abbreviation of your College, Department, Unit or Subject name in a single line, short character design. Use this version also to create casual lockups for social media. i.e. CASNR, IANR, COJMC. <br><em>*Restricted to merchandise and social media use only.</em> </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="acronym_subject" id="type-acronym-subject" <?php if ($context->lockup->style == 'acronym_subject') echo 'checked="checked"'; ?>> - <img class="horiz height-40" src="/images/acronym_subject_example.png"> - <img class="vert" style="display: none;" src="/images/acronym_subject_vert_example.png"> + <img class="horiz height-40" src="<?php echo $context->baseURL; ?>images/acronym_subject_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/acronym_subject_vert_example.png"> </label><br> - <label for="type-acronym-subject"> + <label for="type-acronym-subject" class="dcf-label"> Merchandise lockup (B): primary and secondary hierarchy for the shorthand abbreviation of your College, Department, Unit or Subject name in a single line, short character design. Restricted to merchandise use only. i.e. CASNR/ALEC, CEHS/CYFS. </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="acronym_subject_2_1" id="type-acronym-subject-2-1" <?php if ($context->lockup->style == 'acronym_subject_2_1') echo 'checked="checked"'; ?>> - <img class="horiz" src="/images/acronym_subject_2-1_vert_example.png"> - <img class="vert" style="display: none;" src="/images/acronym_subject_2-1_vert_example.png"> + <img class="horiz" src="<?php echo $context->baseURL; ?>images/acronym_subject_2-1_vert_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/acronym_subject_2-1_vert_example.png"> </label><br> - <label for="type-acronym-subject-2-1"> + <label for="type-acronym-subject-2-1" class="dcf-label"> Embroidery lockup: primary hierarchy for your full College, Department, Unit or Subject name in two lines and secondary hierarchy in a single and optional two-line design.* <br><em>*Embroidery requires larger text, so we recommend keeping text to a minimum and as few lines of text as possible.</em> <br><em>**This lockup is vertical style ONLY.</em> </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="extension" id="type-extension" <?php if ($context->lockup->style == 'extension') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/extension_example.png"> - <img class="vert" style="display: none;" src="/images/extension_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/extension_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/extension_vert_example.png"> </label><br> - <label for="type-extension"> + <label for="type-extension" class="dcf-label"> Extension lockup: primary hierarchy for Extension and secondary hierarchy for the counties in a single line design. </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="ncta" id="type-ncta" <?php if ($context->lockup->style == 'ncta') echo 'checked="checked"'; ?>> - <img class="horiz height-38" src="/images/ncta_example.png"> - <img class="vert" style="display: none;" src="/images/ncta_vert_example.png"> + <img class="horiz height-38" src="<?php echo $context->baseURL; ?>images/ncta_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/ncta_vert_example.png"> </label><br> - <label for="type-extension"> + <label for="type-extension" class="dcf-label"> NCTA lockup: primary hierarchy for NCTA and secondary hierarchy for the subject in a single line design. </label><br><br> </div> - <div class="wdn-col"> - <label> + <div> + <label class="dcf-label"> <input type="radio" name="type" value="extension_4h" id="type-extension-4h" <?php if ($context->lockup->style == 'extension_4h') echo 'checked="checked"'; ?>> - <img class="horiz" src="/images/extension_4h_vert_example.png"> - <img class="vert" style="display: none;" src="/images/extension_4h_vert_example.png"> + <img class="horiz" src="<?php echo $context->baseURL; ?>images/extension_4h_vert_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/extension_4h_vert_example.png"> </label><br> - <label for="type-extension-4h"> + <label for="type-extension-4h" class="dcf-label"> Extension/4H lockup: primary hierarchy for Extension and secondary hierarchy for the counties in a single line design. 4H logo included. <br><em>*This lockup is vertical style ONLY.</em> </label><br><br> </div> </div> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> - <label class="center"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> + <label class="center dcf-label"> <input type="radio" name="type" value="acronym_social" id="type-acronym-social" <?php if ($context->lockup->style == 'acronym_social') echo 'checked="checked"'; ?>> - <img class="horiz" src="/images/acronym_social_vert_example.png"> - <img class="vert" style="display: none;" src="/images/acronym_social_vert_example.png"> + <img class="horiz" src="<?php echo $context->baseURL; ?>images/acronym_social_vert_example.png"> + <img class="vert" style="display: none;" src="<?php echo $context->baseURL; ?>images/acronym_social_vert_example.png"> </label><br> - <label for="type-acronym-social"> + <label for="type-acronym-social" class="dcf-label"> Social lockup: primary hierarchy for the shorthand abbreviation of your College, Department, Unit or Subject name in a single line, short character design. <br><em>*This lockup is vertical style ONLY.</em> </label><br><br> @@ -175,8 +174,8 @@ </div> </fieldset> - <fieldset id="lockup-text"> - <legend>Lockup Text</legend> + <fieldset id="lockup-text" class="dcf-pt-4 dcf-pb-4"> + <legend class="dcf-legend">Lockup Text</legend> <div id="text-notice" class="wdn_notice alert" style="display: none;" tab-index="-1"> <div class="message"> <h4>Invalid Text Entered</h4> @@ -184,27 +183,26 @@ </div> </div> - <div id="organization-field"> - <label for="organization">Organization</label> + <label for="organization" class="dcf-label">Organization</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 31 characters max </div> </div> - <input type="text" name="organization" id="organization" maxlength="31" value="<?php echo $context->lockup->organization; ?>"> + <input class="dcf-input-text" type="text" name="organization" id="organization" maxlength="31" value="<?php echo $context->lockup->organization; ?>"> </div> <div id="organization-second-line-field" style="display: none;"> - <label for="organization-second-line">Organization Second Line</label> + <label for="organization-second-line" class="dcf-label">Organization Second Line</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 31 characters max </div> </div> - <input type="text" name="organization_second_line" maxlength="31" id="organization-second-line"> + <input class="dcf-input-text" type="text" name="organization_second_line" maxlength="31" id="organization-second-line"> </div> <div id="subject-field" style="display: none;"> - <label for="subject">Subject</label> + <label for="subject" class="dcf-label">Subject</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 40 characters max @@ -214,87 +212,86 @@ <br> </div> <div id="subject-second-line-field" style="display: none;"> - <label for="subject-second-line">Subject Second Line</label> + <label for="subject-second-line" class="dcf-label">Subject Second Line</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 40 characters max </div> </div> - <input type="text" name="subject_second_line" maxlength="40" id="subject-second-line" value="<?php echo $context->lockup->subject_second_line; ?>"> + <input class="dcf-input-text" type="text" name="subject_second_line" maxlength="40" id="subject-second-line" value="<?php echo $context->lockup->subject_second_line; ?>"> <br> </div> <div id="acronym-field" style="display: none;"> - <label for="acronym">Acronym</label> + <label for="acronym" class="dcf-label">Acronym</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 10 characters max </div> </div> - <input type="text" name="acronym" id="acronym" maxlength="10" value="<?php echo $context->lockup->acronym; ?>"> + <input class="dcf-input-text" type="text" name="acronym" id="acronym" maxlength="10" value="<?php echo $context->lockup->acronym; ?>"> <br> </div> <div id="acronym-second-line-field" style="display: none;"> - <label for="acronym-second-line">Acronym Second Line</label> + <label for="acronym-second-line" class="dcf-label">Acronym Second Line</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 10 characters max </div> </div> - <input type="text" name="acronym_second_line" id="acronym-second-line" maxlength="10" value="<?php echo $context->lockup->acronym_second_line; ?>"> + <input class="dcf-input-text" type="text" name="acronym_second_line" id="acronym-second-line" maxlength="10" value="<?php echo $context->lockup->acronym_second_line; ?>"> <br> </div> <div id="acronym-subject-field" style="display: none;"> - <label for="acronym-subject">Subject Acronym</label> + <label for="acronym-subject" class="dcf-label">Subject Acronym</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 15 characters max </div> </div> - <input type="text" name="acronym_subject" id="acronym-subject" maxlength="15" value="<?php echo $context->lockup->acronym_subject; ?>"> + <input class="dcf-input-text" type="text" name="acronym_subject" id="acronym-subject" maxlength="15" value="<?php echo $context->lockup->acronym_subject; ?>"> <br> </div> <div id="extension-county-field" style="display: none;"> - <label for="extension-county">Extension County</label> + <label for="extension-county" class="dcf-label">Extension County</label> <div class="tooltip wdn-icon-info italic hang-right"> <div> 40 characters max </div> </div> - <input type="text" name="extension_county" id="extension-county" maxlength="40" value="<?php echo $context->lockup->extension_county; ?>"> + <input class="dcf-input-text" type="text" name="extension_county" id="extension-county" maxlength="40" value="<?php echo $context->lockup->extension_county; ?>"> <br> </div> </fieldset> - <fieldset> - <legend>File Name Designations</legend> - <label class="explanation"> + <fieldset class="dcf-pt-4 dcf-pb-4"> + <legend class="dcf-legend">File Name Designations</legend> + <label class="explanation" class="dcf-label"> The content entered in these fields does not affect the actual text in the lockup. It is used to determine file names for lockups. </label> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> <label for="file-organization">College/Organization/Institution</label> - <input type="text" id="file-organization" name="file_organization" value="<?php echo $context->lockup->file_organization; ?>"> + <input class="dcf-input-text" type="text" id="file-organization" name="file_organization" value="<?php echo $context->lockup->file_organization; ?>"> <label for="file-organization-acronym">College/Organization/Institution Acronym</label> - <input type="text" id="file-organization-acronym" name="file_organization_acronym" value="<?php echo $context->lockup->file_organization_acronym; ?>"> + <input class="dcf-input-text" type="text" id="file-organization-acronym" name="file_organization_acronym" value="<?php echo $context->lockup->file_organization_acronym; ?>"> </div> - <div class="wdn-col"> + <div> <label for="file-department">Department</label> - <input type="text" id="file-department" name="file_department" value="<?php echo $context->lockup->file_department; ?>"> + <input class="dcf-input-text" type="text" id="file-department" name="file_department" value="<?php echo $context->lockup->file_department; ?>"> <label for="file-department-acronym">Department Acronym</label> - <input type="text" id="file-department-acronym" name="file_department_acronym" value="<?php echo $context->lockup->file_department_acronym; ?>"> + <input class="dcf-input-text" type="text" id="file-department-acronym" name="file_department_acronym" value="<?php echo $context->lockup->file_department_acronym; ?>"> </div> </div> - </fieldset> - <fieldset> - <legend>Communicator Approval</legend> - <label class="explanation"> + <fieldset class="dcf-pt-4 dcf-pb-4"> + <legend class="dcf-legend">Communicator Approval</legend> + <label class="explanation dcf-label"> Lockup requests will be reviewed for approval by your designated Communicator Contact and University Communication. </label><br> - <label for="approver">Select your Communicator Contact:</label> - <select id="approver" name="approver"> + <label for="approver" class="dcf-label">Select your Communicator Contact:</label> + <select id="approver" name="approver" class="dcf-input-select"> <option value="">Select your Communicator Contact</option> <?php foreach ($context->approvers as $user): ?> <option <?php if ($context->lockup->approver_id == $user->id) echo 'selected="selected"'; ?> value="<?php echo $user->id ?>"><?php echo $user->name ?> (<?php echo $user->organization_acronym ?>)</option> @@ -304,15 +301,16 @@ </fieldset> <?php if (\Auth::$current_user !== NULL): ?> - <button type="submit" class="wdn-button wdn-button-brand">Submit Lockup</button> + <button type="submit" class="dcf-btn dcf-btn-primary">Submit Lockup</button> <?php else: ?> - <a class="wdn-button wdn-button-brand" href="https://shib.unl.edu/idp/profile/cas/login?service=<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">Login</a> + <a class="dcf-btn dcf-btn-primary" href="https://shib.unl.edu/idp/profile/cas/login?service=<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">Login</a> <?php endif; ?> </form> </div> </div> -<script type="text/javascript"> +<?php +$context->scriptState->loadScriptDeclaration(" function ucwords (str) { return (str + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) { return $1.toUpperCase(); @@ -469,5 +467,5 @@ require(['jquery'], function ($) { } }).change(); }); -}); -</script> +});"); +?> diff --git a/src/Views/not_found.php b/src/Views/not_found.php index fff7e4b3807a060e11d685721af10f883cff636a..1b2fccda340fcb0c63f586bf7d6ca411f7d63e84 100644 --- a/src/Views/not_found.php +++ b/src/Views/not_found.php @@ -1,5 +1,5 @@ -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> Not Found </div> </div> \ No newline at end of file diff --git a/src/Views/preview_lockup.php b/src/Views/preview_lockup.php index e2b06dc9b7b8232adb7c1cd67fd974513035c967..a1df9da5518aa3024e3e62211f271ebf48ba5a42 100644 --- a/src/Views/preview_lockup.php +++ b/src/Views/preview_lockup.php @@ -1,15 +1,15 @@ -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Preview for "<?php echo $context->lockup->getName() ?>" Lockup</h3> - <div class="bp2-wdn-grid-set-halves wdn-center"> - <div class="wdn-col center"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw dcf-txt-center"> + <div class="center"> <?php if ($context->lockup->style != 'acronym_subject_2_1' && $context->lockup->style != 'acronym_social' && $context->lockup->style != 'extension_4h'): ?> <?php echo $context->lockup->preview_svg; ?> <?php else: ?> No horizontal version of this lockup. <?php endif; ?> </div> - <div class="wdn-col center"> + <div class="center"> <?php echo $context->lockup->vert_preview_svg; ?> </div> </div> @@ -44,13 +44,13 @@ $creative_approval_words = 'Feedback received'; } ?> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col" style="margin-bottom: 1em;"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div style="margin-bottom: 1em;"> <div class="approval-bug <?php echo $comm_approval_status; ?>"> <strong><?php echo $comm_approval_words; ?></strong><br>from<br><strong><?php echo $context->lockup->approver == NULL ? '(communicator not specified)' : $context->lockup->getApproverName(); ?></strong> </div> </div> - <div class="wdn-col"> + <div> <div class="approval-bug <?php echo $creative_approval_status; ?>"> <strong><?php echo $creative_approval_words; ?></strong><br>from<br><strong>University Communications</strong> </div> @@ -62,15 +62,15 @@ <div class="vi-header"> Actions </div> - <div class="tools wdn-center"> + <div class="tools dcf-txt-center"> <?php if ($context->lockup->user_id == \Auth::$current_user->id || \Auth::$current_user->isAdmin()): ?> - <div><a class="wdn-button wdn-button-triad" href="<?php echo $context->lockup->getEditURL(); ?>">Edit Lockup</a></div><br> + <div><a class="dcf-btn wdn-button-triad" href="<?php echo $context->lockup->getEditURL(); ?>">Edit Lockup</a></div><br> <?php endif; ?> <?php if ($context->lockup->isFullyApproved() && ($context->lockup->user_id == \Auth::$current_user->id || \Auth::$current_user->isAdmin())): ?> - <form method="POST" action="/lockups/generate/" id="generate" class="wdn-center" style="background-color: #DDDDDD"> + <form method="POST" action="/lockups/generate/" id="generate" class="dcf-txt-center" style="background-color: #DDDDDD"> <div><label>You have permission to generate this lockup. Click "Generate Files" below to begin.</label></div> <input type="text" class="hidden" value="<?php echo $context->lockup->id ?>" name="id"> - <button type="submit" class="wdn-button wdn-button-complement" id="submit-generate">Generate Files</button><br> + <button type="submit" class="dcf-btn wdn-button-complement" id="submit-generate">Generate Files</button><br> <input type="checkbox" checked="checked" id="publish-lockup" name="publish-lockup"><label for="publish-lockup">Publish lockup for all UNL users?</label> <div style="display: none;" id="going-message"> <img src="/images/spinner.svg" style="height: 16px;"> @@ -80,23 +80,23 @@ <br> <?php endif; ?> - <form id="approve" class="wdn-center"> + <form id="approve" class="dcf-txt-center"> <?php if ((\Auth::$current_user->isApprover() && $context->lockup->approver_id == \Auth::$current_user->id) || (\Auth::$current_user->isCreative()) || \Auth::$current_user->isAdmin()): ?> - <button id="approve-lockup" type="button" class="wdn-button wdn-button-complement">Approve This Lockup</button> - <button id="leave-feedback" type="button" class="wdn-button wdn-button-triad">Just Leave Feedback</button> - <button id="deny-lockup" type="button" class="wdn-button wdn-button-brand">Deny This Lockup</button> + <button id="approve-lockup" type="button" class="dcf-btn wdn-button-complement">Approve This Lockup</button> + <button id="leave-feedback" type="button" class="dcf-btn wdn-button-triad">Just Leave Feedback</button> + <button id="deny-lockup" type="button" class="dcf-btn dcf-btn-primary">Deny This Lockup</button> <div style="margin-top: 1em;"><label>Feedback will be left whichever option you choose above.</label></div> <?php endif; ?> <fieldset> <legend><?php if (\Auth::$current_user->isApprover() && $context->lockup->approver_id == \Auth::$current_user->id || \Auth::$current_user->isCreative()) echo 'Leave '; ?>Feedback</legend> - <div class="bp2-wdn-grid-set-halves"> - <div class="wdn-col"> + <div class="dcf-grid-full dcf-grid-halves@sm dcf-col-gap-vw"> + <div> <label for="communicator-feedback">Communicator Feedback</label> <textarea <?php if (!(\Auth::$current_user->isApprover() && $context->lockup->approver_id == \Auth::$current_user->id)) echo 'disabled' ?> rows=10 id="communicator-feedback" name="communicator_feedback"><?php echo $context->lockup->communicator_feedback; ?></textarea> </div> - <div class="wdn-col"> + <div> <label for="creative-feedback">Creative Feedback</label> <textarea <?php if (!\Auth::$current_user->isCreative()) echo 'disabled' ?> rows=10 id="creative-feedback" name="creative_feedback"><?php echo $context->lockup->creative_feedback; ?></textarea> </div> @@ -108,61 +108,62 @@ </div> </div> -<script type="text/javascript"> +<?php +$context->scriptState->loadScriptDeclaration(" require(['jquery'], function ($) { $(document).ready(function () { - $('#generate').submit(function (submit) { - $('#going-message').show(); - $('#submit-generate').attr('disabled', 'disabled'); - }); + $('#generate').submit(function (submit) { + $('#going-message').show(); + $('#submit-generate').attr('disabled', 'disabled'); + }); - $('#approve-lockup').click(function (click) { - click.preventDefault(); - $.ajax({ - url: '/lockups/approve/', - type: 'POST', - data: { - id: <?php echo $context->lockup->id; ?>, - communicator_feedback: $('#communicator-feedback').val(), - creative_feedback: $('#creative-feedback').val() - }, - complete: function () { - window.location = window.location; - } - }); - }); + $('#approve-lockup').click(function (click) { + click.preventDefault(); + $.ajax({ + url: '/lockups/approve/', + type: 'POST', + data: { + id: " . $context->lockup->id . ", + communicator_feedback: $('#communicator-feedback').val(), + creative_feedback: $('#creative-feedback').val() + }, + complete: function () { + window.location = window.location; + } + }); + }); - $('#leave-feedback').click(function (click) { - click.preventDefault(); - $.ajax({ - url: '/lockups/feedback/', - type: 'POST', - data: { - id: <?php echo $context->lockup->id; ?>, - communicator_feedback: $('#communicator-feedback').val(), - creative_feedback: $('#creative-feedback').val() - }, - complete: function () { - window.location = window.location; - } - }); - }); + $('#leave-feedback').click(function (click) { + click.preventDefault(); + $.ajax({ + url: '/lockups/feedback/', + type: 'POST', + data: { + id: " . $context->lockup->id . ", + communicator_feedback: $('#communicator-feedback').val(), + creative_feedback: $('#creative-feedback').val() + }, + complete: function () { + window.location = window.location; + } + }); + }); - $('#deny-lockup').click(function (click) { - click.preventDefault(); - $.ajax({ - url: '/lockups/deny/', - type: 'POST', - data: { - id: <?php echo $context->lockup->id; ?>, - communicator_feedback: $('#communicator-feedback').val(), - creative_feedback: $('#creative-feedback').val() - }, - complete: function () { - window.location = window.location; - } - }); - }); + $('#deny-lockup').click(function (click) { + click.preventDefault(); + $.ajax({ + url: '/lockups/deny/', + type: 'POST', + data: { + id: " . $context->lockup->id . ", + communicator_feedback: $('#communicator-feedback').val(), + creative_feedback: $('#creative-feedback').val() + }, + complete: function () { + window.location = window.location; + } + }); + }); }); -}); -</script> \ No newline at end of file +});"); +?> \ No newline at end of file diff --git a/src/Views/regenerate.php b/src/Views/regenerate.php index 331bce3661eb0e2ea787ff687306fe009a503be8..c4873a5c2e690f38bbc17c3468d97adc7b4e5d88 100644 --- a/src/Views/regenerate.php +++ b/src/Views/regenerate.php @@ -1,7 +1,7 @@ -<div class="wdn-band"> - <div class="wdn-inner-wrapper"> +<div class="dcf-bleed dcf-pt-8 dcf-pb-8"> + <div class="dcf-wrapper"> <h3 class="page-title">Please Regenerate This Lockup - <small class="wdn-subhead"><?php echo $context->lockup->getName(); ?></small> + <small class="dcf-subhead"><?php echo $context->lockup->getName(); ?></small> </h3> <div id="explanation"> <p> @@ -15,11 +15,11 @@ <div class="vi-header"> Actions </div> - <div class="tools wdn-center"> + <div class="tools dcf-txt-center"> <?php if ($context->lockup->isFullyApproved()): ?> - <form method="POST" action="/lockups/regenerate/" id="regenerate" class="wdn-center"> + <form method="POST" action="/lockups/regenerate/" id="regenerate" class="dcf-txt-center"> <input type="text" class="hidden" value="<?php echo $context->lockup->id ?>" name="id"> - <button type="submit" class="wdn-button wdn-button-triad" id="submit-regenerate">Regenerate Files</button> + <button type="submit" class="dcf-btn wdn-button-triad" id="submit-regenerate">Regenerate Files</button> <div style="display: none;" id="going-message"> <img src="/images/spinner.svg" style="height: 16px;"> <label style="font-style: italic;">And off we go! This will take a little while. Please be patient, we'll redirect you when this is complete.</label> @@ -31,7 +31,8 @@ </div> </div> -<script type="text/javascript"> +<?php +$context->scriptState->loadScriptDeclaration(" require(['jquery'], function ($) { $(document).ready(function () { $('#regenerate').submit(function (submit) { @@ -39,5 +40,5 @@ require(['jquery'], function ($) { $('#submit-regenerate').attr('disabled', 'disabled'); }); } -)}); -</script> \ No newline at end of file +)});"); +?> \ No newline at end of file