diff options
author | René Gieling <github@dartcafe.de> | 2017-09-19 23:01:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 23:01:55 +0300 |
commit | 320781094096037eab7d0014dad2d13fe1f2ad40 (patch) | |
tree | 91ec9deb7ee93c4d966c267dfb3ef9766d300bdd | |
parent | f8ca6bf5828a412d4f92ada878e828ac509642cb (diff) |
[WIP] New Design. (#151)
* Update create.tmpl.php
* Update goto.tmpl.php
* Update main.tmpl.php
* Create navigation.tmpl.php
* Update vote.js
* Add files via upload
* Update vote.css
* Update main.css
* Update list.css
* Update create.css
* Update main.tmpl.php
* Add files via upload
* Update main.tmpl.php
* Update main.css
* Moved polltype to right cloumn
* Remove Header "Basic information"
* Switch to scss
* Fix for public URL
* relative path to svg
* Fix poll link
* Some tidy and switch to scss
* Cosmetics
Added empty content and some removed some tags
* quick fix for small lines
* Date fix
* remove footer
* Adding avatars
Added avatars zu participants and removed breadcrump if user is not logged in
* Syntax error
* Avatar fix for public polls
* limit width of avatar cell
* Tidy and changed classes
* Fix breadcrump
* Update
* Switch to SCSS
For some reason the create.scss cannot be compiled, so I renamed the file.
* Switch to SCSS and changed classes
* fix
* Fix for total count
* Change of vote table layout
* Updated screenshots
* Css change
* Changed toggle image
* Fix for wrong display of votes
* Change in toggle presentation
* Remove unneeded navigation bar and use proper links to images
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Polish public poll page
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix total row in date polls
* Added padding back to comment
-rw-r--r-- | css/createpoll.scss (renamed from css/create.css) | 16 | ||||
-rw-r--r-- | css/list.css | 34 | ||||
-rw-r--r-- | css/list.scss | 190 | ||||
-rw-r--r-- | css/main.scss (renamed from css/main.css) | 70 | ||||
-rw-r--r-- | css/vote.css | 171 | ||||
-rw-r--r-- | css/vote.scss | 286 | ||||
-rw-r--r-- | img/finished-vote.svg | 62 | ||||
-rw-r--r-- | img/home.svg | 5 | ||||
-rw-r--r-- | img/maybe-toggle.svg | 68 | ||||
-rw-r--r-- | img/maybe-vote.svg | 8 | ||||
-rw-r--r-- | img/no-toggle.svg | 68 | ||||
-rw-r--r-- | img/no-vote.svg | 9 | ||||
-rw-r--r-- | img/no.svg | 77 | ||||
-rw-r--r-- | img/progress-vote.svg | 62 | ||||
-rw-r--r-- | img/toggle-maybe.svg | 129 | ||||
-rw-r--r-- | img/toggle-no.svg | 129 | ||||
-rw-r--r-- | img/toggle-yes.svg | 129 | ||||
-rw-r--r-- | img/un-vote.svg | 57 | ||||
-rw-r--r-- | img/yes-toggle.svg | 68 | ||||
-rw-r--r-- | img/yes-vote.svg | 8 | ||||
-rw-r--r-- | img/yes.svg | 4 | ||||
-rw-r--r-- | js/vote.js | 75 | ||||
-rw-r--r-- | l10n/de.js | 6 | ||||
-rw-r--r-- | screenshots/nc_new_poll.png | bin | 63954 -> 0 bytes | |||
-rw-r--r-- | screenshots/new-poll.png | bin | 64245 -> 42120 bytes | |||
-rw-r--r-- | screenshots/overview.png | bin | 21027 -> 40069 bytes | |||
-rw-r--r-- | screenshots/vote.png | bin | 43089 -> 42690 bytes | |||
-rw-r--r-- | templates/create.tmpl.php | 51 | ||||
-rw-r--r-- | templates/goto.tmpl.php | 252 | ||||
-rw-r--r-- | templates/main.tmpl.php | 251 |
30 files changed, 1630 insertions, 655 deletions
diff --git a/css/create.css b/css/createpoll.scss index 334c72bf..492beb23 100644 --- a/css/create.css +++ b/css/createpoll.scss @@ -1,5 +1,5 @@ .user-group-list { - display :none; + display: none; border: 1px solid #DDD; margin: 15px; padding: 5px; @@ -8,10 +8,6 @@ overflow-y: auto; } -.user-group-list h3 { - margin 0 0 5px; -} - #sec_name { display: none; } @@ -77,14 +73,16 @@ table td { table .icon-close { cursor: pointer; - background-color: #ff6f6f; + background-color: #ffede9; /*red*/ padding: 0 5px; + background-image: url('../img/no-vote.svg'); } table .icon-checkmark { - cursor: pointer; - background-color: #6fff70; - padding: 0 5px; + cursor: pointer; + background-color: #ebf5d6; /*green*/ + padding: 0 5px; + background-image: url('../img/yes-vote.svg'); } #expiration { diff --git a/css/list.css b/css/list.css deleted file mode 100644 index 85133230..00000000 --- a/css/list.css +++ /dev/null @@ -1,34 +0,0 @@ -table { - width: 100%; -} - -table thead th { - font-weight: bold; - text-align: left; - padding: 3px 5px; - background-color: #337AB7; - color: #FFF; -} - -table tbody td { - text-align: left; - padding: 3px 5px; -} - -tbody tr:nth-child(even) { - background-color: #337AB7; - color: #fff; -} - -tbody tr:nth-child(even):hover { - background-color: #CDF5FF; - color: #000; -} - -tbody tr:nth-child(even):hover a { - color: #000; -} - -tbody tr:nth-child(even) a { - color: #fff; -} diff --git a/css/list.scss b/css/list.scss new file mode 100644 index 00000000..a63aa33a --- /dev/null +++ b/css/list.scss @@ -0,0 +1,190 @@ +#controls h2 { + float: left; + padding: 15px 15px 0 15px; +} + +.app-polls #app-content { + transition: background-color 0.3s ease; + overflow-x: hidden; +} + +.thumbnail { + background-size: 32px; + &.progress { + background-image: url('../../../apps/polls/css/../img/progress-vote.svg'); + } +} + +.icon-polls { + background-color: black; + mask: url('../../../apps/polls/css/../img/app-logo-polls.svg') no-repeat 50% 50%; +} + +.nametext { + line-height: 2em; +} + +.polltable { + position: relative; + width: 100%; + min-width: 688px; + + &.has-controls { + top: 44px; + } + + tbody tr { + transition: background-color 0.3s ease; + background-color: #fff; + height: 40px; + &:hover, &:focus, &:active, &.highlighted, &.highlighted .name:focus, + &.selected, + &.searchresult, + &.mouseOver td, + .name:focus { + transition: background-color 0.3s ease; + background-color: #f8f8f8; + } + } + + #polllist tr td.pollitem.name { + padding-left: 15px; + } + + #headerName-container { + padding-left: 70px; + } + + th, th a { + color: #999; + } + + th, td { + border-bottom: 1px solid #eee; + text-align: left; + font-weight: normal; + height: 50px; + line-height: 50px; + padding: 0 4px; + } + + th .sort-indicator { + width: 10px; + height: 8px; + margin-left: 5px; + display: inline-block; + vertical-align: text-bottom; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; + filter: alpha(opacity=30); + opacity: 0.3; + } +} + + +.pollitem.name{ + + .nametext { + position: relative; + left: 55px; + padding: 0; + overflow: hidden; + text-overflow: ellipsis; + width: 70%; + max-width: 800px; + height: 100%; + } + + .thumbnail { + display: inline-block; + width: 32px; + height: 32px; + margin-left: 8px; + margin-top: 9px; + cursor: pointer; + float: left; + position: absolute; + z-index: 4; + } + .description { + line-height: initial; + margin-bottom: 5px; + color: #888; + } +} + + +.actions { + padding: 5px; + height: 32px; + display: inline-block; + float: left; + + &.creatable { + position: relative; + z-index: -30; + } + input, button, .button { + margin: 0; + float: left; + } +} + + + +.app-files .actions .button.new { + position: relative; +} + + +@media (max-width: 992px) { + .columnheader, .pollitem { + &.principal, &.created { + display: none; + } + } + + #polllist tr td.pollitem.name { + padding-left: 4px; + } +} + +@media (max-width: 910px) { + .columnheader, .pollitem { + &.access { + display: none; + } + } + + #body-user .polltable { + min-width: 0px; + } +} + +@media (max-width: 768px) { + .columnheader, .pollitem { + &.participations, &.expiry { + display: none; + } + } + + #polllist tr td.pollitem.name { + padding-left: 0px; + } +} + +@media (max-width: 600px) { + .columnheader, .pollitem { + &.principal, &.access, &.created { + display: none; + } + } +} + +@media (max-width: 480px) { + .columnheader, .pollitem { + &.principal, &.access, &.created { + display: none; + } + } +} + diff --git a/css/main.css b/css/main.scss index 3193f6ac..5a9d2674 100644 --- a/css/main.css +++ b/css/main.scss @@ -3,21 +3,16 @@ h1 { margin-bottom: 5px; } -h2 { - font-size: 1.5em; - margin: 10px 0 5px 0; -} - -a { +/* a { color: #35537a; } - -a:not(.button):hover { + */ +/* a:not(.button):hover { text-decoration: underline; } -#app header { - padding-top: 15px; + */#app header { + padding-top: 44px; } .row:after { @@ -33,31 +28,27 @@ a:not(.button):hover { padding: 0px 15px; } -.col-70 { - width: 65%; - float: left; - padding: 0px 15px; -} - .col-50 { width: 50%; float: left; padding: 0px 15px; } -.col-30 { - width: 35%; - float: left; - padding: 0px 15px; -} +.col-70 { width: 65%; float: left; padding: 0px 15px; } -@media(max-width: 1000px) { +.col-30 { width: 35%; float: left; padding: 0px 15px; } + +@media(max-width: 992px) { .col-70, .col-30, .col-50 { float: none; width: 100%; } } +#breadcrump { + min-width: 350px; +} + input[type="text"] { display: block; width: 100%; @@ -68,12 +59,6 @@ textarea { max-width: 100%; } - -table { - border: 1px solid #DDD; - border-radius: 3px; -} - .form-actions { padding: 15px; } @@ -169,7 +154,6 @@ td.td_shown { } .wordwrap { - width: 75%; white-space: normal; word-wrap: break-word; word-break: normal; @@ -188,25 +172,6 @@ td.td_shown { padding: 10px; } -.vote_table thead th { - min-width: 40px; -} - -.time-slot-cell { - min-width: 50px; -} - -.toggle-all { - min-width: 40px; - cursor: pointer; -} - -.user-cell { - text-align: left; - min-width: 100px; - height: 40px; -} - .userNameImg { vertical-align: middle; margin-right: 5px; @@ -239,16 +204,10 @@ td.td_shown { background-color: #82de82; } -.cl_poll_url, .cl_click, .cl_delete, .cl_date_time_header { +.cl_poll_url, .cl_date_time_header { cursor: pointer; } -.cl_delete { - background-color: white; - border-top: 1px solid gray; - border-bottom: 1px solid gray; -} - .cl_pad_left { padding-left: 30px; } @@ -393,3 +352,4 @@ td.td_shown { border-top: 0; border-radius: 0 0 3px 3px; } + diff --git a/css/vote.css b/css/vote.css deleted file mode 100644 index 72c16bc8..00000000 --- a/css/vote.css +++ /dev/null @@ -1,171 +0,0 @@ -.vote_table { - width: 100%; -} - -.vote_table thead tr:nth-child(even) th, .vote_table tfoot tr:nth-child(even) th, .vote_table tfoot tr:nth-child(even) td { - color: #333; -} - -.vote_table thead tr:nth-child(odd) th, .vote_table tfoot tr:nth-child(odd) th, .vote_table tfoot tr:nth-child(odd) td { - background-color: #337AB7; - color: #FFF; -} - -tbody.votes tr:nth-child(even) { - background-color: #D4F7FF; -} - -tbody.votes tr:nth-child(even):hover { - background-color: #CDF5FF; -} - -tbody.total th { - text-align: right; -} - -th, tr, td { - padding: 4px; - text-align: center; -} - -th { - font-weight: bold; -} - -#polls { - width: 100%; -} - -#poll-table { - width: 100%; -} - -#poll-desc, #comments-container, #poll-dates { - margin-bottom: 15px; -} - -#datepicker { - float: left; - padding-right: 15px; -} - -#new-poll-form-warn { - color: red; -} - -#poll-dates table { - min-width: 50%; -} - -#check_notif { - margin-bottom: 10px; -} - -tr.current-user th { - background-color: #337AB7; - color: #FFF -} - -tr.current-user td, tr.current-user th { - border-top: 3px solid #337AB7; - border-bottom: 3px solid #337AB7; -} - -th.external { - padding-left: 40px; - font-style: italic; -} - -th.external input{ - min-width: 100px; -} - -.poll-cell-un, .poll-cell-active-un { - background-color: #FFF3CD; -} - -.poll-cell-is, .poll-cell-active-is, .date-text-selected, .selected-all { - background-color: #6fff70; /*green*/ - background-image: url('../img/yes.svg'); - background-repeat: no-repeat; - background-position: center; - transition: background-color 0.2s; -} - -.poll-cell-not, .poll-cell-active-not, .date-text-not-selected, .selected-none { - background-image: url('../img/no.svg'); - background-repeat: no-repeat; - background-position: center; - transition: background-color 0.2s; -} - -.share { - margin: 10px 0; -} - -.share .input-group-addon{ - background-image: url('../img/share.svg'); - background-repeat: no-repeat; - background-position: 10px center; - padding-left: 35px; -} - -.comment { - border: 1px solid #DDD; - border-radius: 3px; - margin-bottom: 10px; -} - -.comment .comment-header { - background-color: #EEE; - border-bottom: 1px solid #DDD; - border-radius: 3px 3px 0 0; - padding: 2px 5px; -} - -.comment .comment-date { - float: right; - font-size: 0.9em; - color: #555; -} - -.comment .comment-content { - padding: 5px; -} - -.new-comment .icon-loading-small { - float: left; - margin-top: 10px; - display: none; -} - -.new-comment .comment-content textarea { - display: block; - min-width: 100%; - max-width: 100%; - min-height: 66px; -} - -td.total { - padding: 2px 0 1px; - color: #FFF; - font-weight: bold; -} - -.color_yes, .poll-cell-is, .poll-cell-active-is { - background-color: #6fff70; /*green*/ -} -.color_no, .poll-cell-not, .poll-cell-active-not { - background-color: #ff6f6f; /*red*/ -} -.color_maybe, .poll-cell-maybe, .poll-cell-active-maybe, .poll-cell-un, .poll-cell-active-un { - background-color: #fcff6f; /*yellow*/ -} - -.home-link { - background-image: url('../img/home.svg'); - background-repeat: no-repeat; - background-position: 5px center; - padding-left: 26px; - float: right; -} diff --git a/css/vote.scss b/css/vote.scss new file mode 100644 index 00000000..88c23482 --- /dev/null +++ b/css/vote.scss @@ -0,0 +1,286 @@ +$bg_no: #ffede9; +$bg_maybe: #fcf7e1; +$bg_unvoted: #fff4c8; +$bg_yes: #ebf5d6; + +$fg_no: #f45573; +$fg_maybe: #fff3cd; +$fg_unvoted: #fff3cd; +$fg_yes: #49bc49; + + +$bg_current_user: #f7f7f7; +$fg_current_user: #0082c9; +$border_current_user: 2px solid; + +.vote_table { + /* border-spacing: 1px 1px; */ + white-space: normal; + width: 100%; + + thead { + white-space: normal; + + .time-slot, .vote-option { + min-width: 50px; + text-align: center; + + .month, .dayow { + font-size: 1.2em; + color: #666; + } + + .day { + font-size: 1.8em; + margin: 5px 0 5px 0; + } + } + } + + td.avatar-cell { + width: 40px; + } + + td.name { + max-width: 170px; + min-width: 80px; + } + + .total th, .best th{ + text-align: right; + } + + .total td, .best td{ + text-align: center; + } + + .cl_click div, td.cl_click { + cursor: pointer; + } + + + .poll-cell, .toggle { + div { + background-repeat: no-repeat; + background-position: center; + transition: background-color 0.2s; + background-size: 32px; + height: 32px; + width: 32px; + margin-left: auto; + margin-right: auto; + } + + &.yes div { + background-image: url('../img/yes-vote.svg'); + } + + &.maybe div { + background-image: url('../img/maybe-vote.svg'); + } + + &.no div { + background-image: url('../img/no-vote.svg'); + } + + } + + .toggle div { + width: 24px; + height: 24px; + background-size: 24px; + } + + #toggle { + float: left; + cursor: pointer; + } + .poll-cell, .toggle { + border-right: 2px solid white; + } + + + td.toggle-all.toggle { + cursor: pointer; + min-width: 50px; + &.yes div { + background-image: url('../img/yes-toggle.svg'); + } + + &.maybe div { + background-image: url('../img/maybe-toggle.svg'); + } + + &.no div { + background-image: url('../img/no-toggle.svg'); + } + + + + img { + float: right; + padding-top: 4px; + cursor: pointer; + display: none; + } + } + + .current-user { + + td { + border-top: $border_current_user $fg_current_user; + border-bottom: $border_current_user $fg_current_user; + background-color: $bg_current_user; + + &:first-child { + border-left: $border_current_user $fg_current_user; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } + &:last-child { + border-right: $border_current_user $fg_current_user; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + } + + + .name { + font-weight: bold; + } + + } + +} + +.vote_table { + .poll-cell, .toggle, .result-cell { + + div { + background-color: transparent; + } + &.unvoted { + background-color: $bg_unvoted; + color: $fg_unvoted; + div { + color: $fg_unvoted; + } + } + + &.yes { + background-color: $bg_yes; + color: $fg_yes; + div { + color: $fg_yes; + } + } + &.no { + background-color: $bg_no; + color: $fg_no; + div { + color: $fg_no; + } + } + &.maybe { + background-color: $bg_maybe; + color: $fg_maybe; + div { + color: $fg_maybe; + } + } + } + td.total { + padding: 2px 0 1px; + } + +} + +th, tr, td { + padding: 4px; + /* text-align: center; */ +} + +.votes { + th, tr, td { + /* text-align: left; */ + border-top: 1px solid #ddd; + } +} + + + +.external th { + padding-left: 40px; + + input { + min-width: 100px; + } +} + +.finish_vote { + display: contents; +} + +.share { + margin: 10px 0; + + .input-group-addon{ + background-image: url('../img/share.svg'); + background-repeat: no-repeat; + background-position: 10px center; + padding-left: 35px; + } +} + +#poll-desc, #comments-container, #poll-dates { + margin-bottom: 15px; +} + +.comment { + border: 1px solid #DDD; + border-radius: 3px; + margin-bottom: 10px; + + &.new-comment { + border: none; + } + + .comment-header { + background-color: #EEE; + border-bottom: 1px solid #DDD; + border-radius: 3px 3px 0 0; + padding: 2px 5px; + } + + .comment-date { + float: right; + color: #555; + } + + .comment-content { + padding: 5px; + } +} + +.new-comment { + + .icon-loading-small { + float: left; + margin-top: 10px; + display: none; + } + + .comment-content textarea { + display: block; + min-width: 100%; + max-width: 100%; + min-height: 66px; + } +} + +#controls h2 { + margin-top: 12px; +} + + + diff --git a/img/finished-vote.svg b/img/finished-vote.svg new file mode 100644 index 00000000..9b9766a8 --- /dev/null +++ b/img/finished-vote.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="finished-vote.svg"> + <metadata + id="metadata10"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview8" + showgrid="false" + inkscape:zoom="22.627417" + inkscape:cx="-6.1344685" + inkscape:cy="6.6642002" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4" /> + <path + d="M 7.0667928,11.112005 3.482918,7.5281303 4.5059513,6.504373 7.0667928,9.0630421 11.659945,4.442378 12.697458,5.4806156 Z" + style="fill:#49bc49;fill-opacity:1" + id="path6" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:1;fill:none;fill-opacity:1;stroke:#49bc49;stroke-width:0.96499372;stroke-opacity:1" + id="path4138" + cx="8.090188" + cy="7.7771916" + rx="7.2714972" + ry="6.7282681" /> +</svg> diff --git a/img/home.svg b/img/home.svg deleted file mode 100644 index 2edc3af2..00000000 --- a/img/home.svg +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <rect style="color:#000000" fill-opacity="0" height="97.986" width="163.31" y="-32.993" x="-62.897"/> - <path opacity=".5" d="m8 1.0306-8 7.9694h3v6.0001h10v-6h3l-3-3.0306v-3.9695h-3v1.0812l-2-2.0505z" fill-rule="evenodd"/> -</svg> diff --git a/img/maybe-toggle.svg b/img/maybe-toggle.svg new file mode 100644 index 00000000..6583e983 --- /dev/null +++ b/img/maybe-toggle.svg @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="maybe-toggle.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="181.01934" + inkscape:cx="3.9049731" + inkscape:cy="3.47739" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4" /> + <path + d="m 9.8721084,10.669674 -2.4237061,0 0,-0.328979 q 0,-0.5505384 0.2215576,-0.9735121 Q 7.8915175,8.9374954 8.6031875,8.2795365 L 9.032875,7.8901322 Q 9.4155654,7.5410111 9.5901259,7.2321732 9.7714003,6.9233353 9.7714003,6.6144974 q 0,-0.4699707 -0.3222656,-0.7318115 -0.3222656,-0.2685547 -0.8996582,-0.2685547 -0.5438232,0 -1.1749267,0.2282715 -0.6311036,0.2215576 -1.315918,0.6646728 l 0,-2.1081543 Q 6.8710097,4.1169388 7.5423964,3.9826615 8.2137832,3.8483841 8.8381728,3.8483841 q 1.6381832,0 2.4975582,0.6713867 0.859375,0.6646729 0.859375,1.9470215 0,0.657959 -0.261841,1.1816406 -0.26184,0.5169678 -0.892944,1.114502 L 10.610633,9.1456253 Q 10.154091,9.5618851 10.0131,9.8170119 9.8721084,10.065426 9.8721084,10.36755 l 0,0.302124 z m -2.4237061,0.993653 2.4237061,0 0,2.390136 -2.4237061,0 0,-2.390136 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.75px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ffc107;fill-opacity:1" + id="path4151" + inkscape:connector-curvature="0" /> + <rect + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#ffc107;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect8069" + width="12.22084" + height="12.572014" + x="3.0164487" + y="2.6649165" /> + <path + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#ffc107;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 2.2943963,13.334791 -1.53061183,0 0,-12.57201403 12.22084053,0 0,1.17665813" + id="rect8069-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> +</svg> diff --git a/img/maybe-vote.svg b/img/maybe-vote.svg new file mode 100644 index 00000000..f99fe6ac --- /dev/null +++ b/img/maybe-vote.svg @@ -0,0 +1,8 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+ <defs>
+ </defs>
+ <path
+ d="m 8.8957253,9.4975672 -2.4237061,0 0,-0.3289795 q 0,-0.5505371 0.2215576,-0.9735108 Q 6.9151344,7.7653894 7.6268044,7.1074305 L 8.0564919,6.7180262 Q 8.4391823,6.3689051 8.6137428,6.0600672 8.7950172,5.7512293 8.7950172,5.4423914 q 0,-0.4699707 -0.3222656,-0.7318115 Q 8.150486,4.4420252 7.5730934,4.4420252 q -0.5438232,0 -1.1749267,0.2282715 -0.6311036,0.2215576 -1.315918,0.6646728 l 0,-2.1081543 Q 5.8946266,2.9448328 6.5660133,2.8105555 7.2374001,2.6762781 7.8617897,2.6762781 q 1.6381836,0 2.4975583,0.6713867 0.859375,0.6646729 0.859375,1.9470215 0,0.657959 -0.261841,1.1816406 -0.26184,0.5169678 -0.892944,1.114502 L 9.6342506,7.9735193 Q 9.1777077,8.3897791 9.0367165,8.644906 8.8957253,8.8933191 8.8957253,9.1954432 l 0,0.302124 z m -2.4237061,0.9936528 2.4237061,0 0,2.390136 -2.4237061,0 0,-2.390136 z"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.75px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ffc107;fill-opacity:1"
+ id="path4151" />
+</svg>
\ No newline at end of file diff --git a/img/no-toggle.svg b/img/no-toggle.svg new file mode 100644 index 00000000..aa5add03 --- /dev/null +++ b/img/no-toggle.svg @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="no-toggle.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="45.254834" + inkscape:cx="11.388298" + inkscape:cy="7.3713583" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4" /> + <path + d="m 14.051685,12.468195 -1.414,1.414 -3.535987,-3.535993 -3.535,3.535993 -1.415,-1.414 3.536,-3.535989 -3.536,-3.536 1.415,-1.414 3.535,3.536 3.515987,-3.555 1.434,1.434 -3.535993,3.535 z" + id="path4" + style="fill:#f45573;fill-opacity:1;stroke:none;stroke-opacity:1" + inkscape:connector-curvature="0" /> + <rect + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#f45573;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect8069" + width="12.22084" + height="12.572014" + x="3.0173023" + y="2.6650629" /> + <path + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#f45573;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 2.2938232,13.334937 -1.52918518,0 0,-12.57201374 12.22084498,0 0,1.17862924" + id="rect8069-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> +</svg> diff --git a/img/no-vote.svg b/img/no-vote.svg new file mode 100644 index 00000000..123a6681 --- /dev/null +++ b/img/no-vote.svg @@ -0,0 +1,9 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+ <defs>
+ </defs>
+ <path
+ d="M12.95 11.536l-1.414 1.414L8 9.414 4.465 12.95 3.05 11.536 6.586 8 3.05 4.464 4.465 3.05 8 6.586l3.516-3.555 1.434 1.434L9.414 8z"
+ fill="#EFB4A7"
+ id="path4"
+ style="fill:#f45573;fill-opacity:1;stroke:none;stroke-opacity:1" />
+</svg>
\ No newline at end of file diff --git a/img/no.svg b/img/no.svg deleted file mode 100644 index c270f76f..00000000 --- a/img/no.svg +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="16" - width="16" - version="1.1" - id="svg2" - inkscape:version="0.91 r13725" - sodipodi:docname="no.svg"> - <metadata - id="metadata15"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1600" - inkscape:window-height="825" - id="namedview13" - showgrid="true" - inkscape:zoom="14.75" - inkscape:cx="-4" - inkscape:cy="8" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="1" - inkscape:current-layer="svg2"> - <inkscape:grid - type="xygrid" - id="grid3343" /> - </sodipodi:namedview> - <defs - id="defs4"> - <filter - id="a" - style="color-interpolation-filters:sRGB" - height="1" - width="1" - y="-2.8582539e-09" - x="-2.8637974e-09"> - <feGaussianBlur - stdDeviation="1.1812806e-08" - id="feGaussianBlur7" /> - </filter> - </defs> - <path - filter="url(#a)" - stroke="#fff" - stroke-width="2" - d="m12.95 11.536-1.414 1.414-3.536-3.5358-3.5355 3.5358-1.4142-1.414 3.5355-3.536-3.5355-3.5356 1.4142-1.4142 3.5355 3.5356 3.516-3.5547 1.434 1.4333-3.5357 3.5356z" - fill="#fff" - id="path9" - style="stroke-linejoin:round;" /> - <path - d="m12.95 11.536-1.414 1.414-3.536-3.5358-3.5355 3.5358-1.4142-1.414 3.5355-3.536-3.5355-3.5356 1.4142-1.4142 3.5355 3.5356 3.516-3.5547 1.434 1.4333-3.5357 3.5356z" - id="path11" - style="fill:#ffffff;stroke:#ffffff;stroke-width:1;stroke-miterlimit:0.4;stroke-dasharray:none;stroke-linejoin:round" /> -</svg> diff --git a/img/progress-vote.svg b/img/progress-vote.svg new file mode 100644 index 00000000..550fd558 --- /dev/null +++ b/img/progress-vote.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="progress-vote.svg"> + <metadata + id="metadata10"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview8" + showgrid="false" + inkscape:zoom="32" + inkscape:cx="1.8293625" + inkscape:cy="7.9394518" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4" /> + <path + d="m 9.0235276,9.085293 -3.9209891,-0.00372 7.16e-4,-1.0779194 2.8005379,0.00153 -0.010048,-4.8523663 1.1355018,0.00147 z" + style="fill:#ffc107;fill-opacity:1" + id="path6" + inkscape:connector-curvature="0" /> + <ellipse + style="opacity:1;fill:none;fill-opacity:1;stroke:#ffc107;stroke-width:0.96499372;stroke-opacity:1" + id="path4138" + cx="8.090188" + cy="7.7771916" + rx="7.2714972" + ry="6.7282681" /> +</svg> diff --git a/img/toggle-maybe.svg b/img/toggle-maybe.svg new file mode 100644 index 00000000..eccc6e10 --- /dev/null +++ b/img/toggle-maybe.svg @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="20" + width="20" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="toggle-maybe.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="32" + inkscape:cx="-0.0110958" + inkscape:cy="7.3676318" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4"> + <inkscape:path-effect + effect="spiro" + id="path-effect17134" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17123" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17119" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17111" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8087" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8083" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8081" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8077" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + </defs> + <ellipse + style="opacity:1;fill:#fff4c8;fill-opacity:1;stroke:none;stroke-width:2.78882337;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path17140" + cx="10.000294" + cy="10.002191" + rx="9.9656096" + ry="9.9673805" /> + <path + d="m 10.895725,11.497567 -2.4237058,0 0,-0.328979 q 0,-0.550537 0.2215576,-0.973511 Q 8.9151344,9.765389 9.6268044,9.107431 L 10.056492,8.718026 q 0.38269,-0.349121 0.557251,-0.657959 0.181274,-0.3088377 0.181274,-0.6176756 0,-0.4699707 -0.322265,-0.7318115 -0.322266,-0.2685547 -0.8996586,-0.2685547 -0.5438232,0 -1.1749267,0.2282715 -0.6311036,0.2215576 -1.315918,0.6646728 l 0,-2.1081543 Q 7.8946266,4.9448328 8.5660133,4.8105555 9.2374001,4.6762781 9.8617897,4.6762781 q 1.6381833,0 2.4975583,0.6713867 0.859375,0.6646729 0.859375,1.9470215 0,0.657959 -0.261841,1.1816407 -0.26184,0.516968 -0.892944,1.114502 l -0.429687,0.38269 q -0.456543,0.41626 -0.597535,0.671387 -0.140991,0.248413 -0.140991,0.550537 l 0,0.302124 z m -2.4237058,0.993653 2.4237058,0 0,2.390136 -2.4237058,0 0,-2.390136 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.75px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ffc107;fill-opacity:1" + id="path4151" + inkscape:connector-curvature="0" /> + <path + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.37600005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 16.909338,10.001926 c 0,3.816985 -3.093403,6.911262 -6.909309,6.911262 -3.8159071,0 -6.9093105,-3.094277 -6.9093104,-6.911262 0,-3.8169854 3.0934034,-6.9112632 6.9093104,-6.9112632" + id="path17129" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssc" /> + <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.74072504px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 2.748639,3.5246055 z" + id="path17132" + inkscape:original-d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 z" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" + inkscape:path-effect="#path-effect17134" /> +</svg> diff --git a/img/toggle-no.svg b/img/toggle-no.svg new file mode 100644 index 00000000..93105441 --- /dev/null +++ b/img/toggle-no.svg @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="20" + width="20" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="toggle-no.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="32" + inkscape:cx="6.9107792" + inkscape:cy="7.3676318" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4"> + <inkscape:path-effect + effect="spiro" + id="path-effect17134" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17123" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17119" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17111" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8087" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8083" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8081" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8077" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + </defs> + <ellipse + style="opacity:1;fill:#ffede9;fill-opacity:1;stroke:none;stroke-width:2.78882337;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path17140" + cx="10.000294" + cy="10.002191" + rx="9.9656096" + ry="9.9673805" /> + <path + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.37600005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 16.909338,10.001926 c 0,3.816985 -3.093403,6.911262 -6.909309,6.911262 -3.8159071,0 -6.9093105,-3.094277 -6.9093104,-6.911262 0,-3.8169854 3.0934034,-6.9112632 6.9093104,-6.9112632" + id="path17129" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssc" /> + <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.74072504px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 2.748639,3.5246055 z" + id="path17132" + inkscape:original-d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 z" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" + inkscape:path-effect="#path-effect17134" /> + <path + inkscape:connector-curvature="0" + d="M 14.763697,13.134597 13.438794,14.4595 10.125599,11.146305 6.8133403,14.4595 5.4875,13.134597 8.8006953,9.821401 5.4875,6.5082061 6.8133403,5.1833028 10.125599,8.496498 13.420054,5.1655 14.763697,6.5091431 11.450502,9.821401 Z" + id="path4" + style="fill:#f45573;fill-opacity:1;stroke:none;stroke-opacity:1" /> +</svg> diff --git a/img/toggle-yes.svg b/img/toggle-yes.svg new file mode 100644 index 00000000..5aa6935a --- /dev/null +++ b/img/toggle-yes.svg @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="20" + width="20" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="toggle-yes.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="32" + inkscape:cx="-0.0110958" + inkscape:cy="7.3676318" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4"> + <inkscape:path-effect + effect="spiro" + id="path-effect17134" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17123" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17119" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect17111" + is_visible="true" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8087" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8083" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + <inkscape:path-effect + effect="spiro" + id="path-effect8081" + is_visible="true" /> + <inkscape:path-effect + effect="skeletal" + id="path-effect8077" + is_visible="true" + pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 Z" + copytype="single_stretched" + prop_scale="1" + scale_y_rel="false" + spacing="0" + normal_offset="0" + tang_offset="0" + prop_units="false" + vertical_pattern="false" + fuse_tolerance="0" /> + </defs> + <ellipse + style="opacity:1;fill:#ebf5d6;fill-opacity:1;stroke:none;stroke-width:2.78882337;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path17140" + cx="10.000294" + cy="10.002191" + rx="9.9656096" + ry="9.9673805" /> + <path + style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.37600005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 16.909338,10.001926 c 0,3.816985 -3.093403,6.911262 -6.909309,6.911262 -3.8159071,0 -6.9093105,-3.094277 -6.9093104,-6.911262 0,-3.8169854 3.0934034,-6.9112632 6.9093104,-6.9112632" + id="path17129" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cssc" /> + <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.74072504px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 2.748639,3.5246055 z" + id="path17132" + inkscape:original-d="m 18.180816,9.372561 -2.651929,0.944006 -0.09671,-4.4686115 z" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" + inkscape:path-effect="#path-effect17134" /> + <path + inkscape:connector-curvature="0" + d="M 8.7009663,13.38725 4.699,9.646271 5.8413795,8.577636 8.7009663,11.248468 13.829951,6.42525 14.9885,7.5090003 Z" + style="fill:#49bc49;fill-opacity:1" + id="path6" /> +</svg> diff --git a/img/un-vote.svg b/img/un-vote.svg new file mode 100644 index 00000000..32347409 --- /dev/null +++ b/img/un-vote.svg @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="un-vote.svg"> + <metadata + id="metadata9"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview7" + showgrid="false" + inkscape:zoom="14.75" + inkscape:cx="8" + inkscape:cy="8" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <defs + id="defs4" /> + <rect + style="opacity:1;fill:none;fill-opacity:1;stroke:#ffc107;stroke-width:1.39999998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect8071" + width="13.966102" + height="13.966102" + x="1.0847459" + y="1.0847455" /> +</svg> diff --git a/img/yes-toggle.svg b/img/yes-toggle.svg new file mode 100644 index 00000000..ffdf9b33 --- /dev/null +++ b/img/yes-toggle.svg @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="16" + width="16" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="yes-toggle.svg"> + <metadata + id="metadata10"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview8" + showgrid="false" + inkscape:zoom="32" + inkscape:cx="0.29729803" + inkscape:cy="7.257137" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" + showguides="true" /> + <defs + id="defs4" /> + <path + d="M 8.0021297,12.218986 4.040336,8.2571749 5.171248,7.1254625 8.0021297,9.9539497 13.079631,4.8460305 14.22655,5.9937501 Z" + style="fill:#49bc49;fill-opacity:1" + id="path6" + inkscape:connector-curvature="0" /> + <rect + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#49bc49;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect8069" + width="12.22084" + height="12.572014" + x="3.0941355" + y="2.7473993" /> + <path + style="opacity:1;fill:none;fill-opacity:0.71372549;fill-rule:nonzero;stroke:#49bc49;stroke-width:1.45034671;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 2.3685379,13.417275 -1.52706618,0 0,-12.57201512 12.22084228,0 0,1.17644712" + id="rect8069-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> +</svg> diff --git a/img/yes-vote.svg b/img/yes-vote.svg new file mode 100644 index 00000000..5908f8e6 --- /dev/null +++ b/img/yes-vote.svg @@ -0,0 +1,8 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
+ <defs>
+ </defs>
+ <path
+ d="M6.09 12.5L1.14 7.55l1.413-1.414L6.09 9.67l6.344-6.382 1.433 1.434z"
+ fill="#84C33F"
+ style="fill:#49bc49;fill-opacity:1" />
+</svg>
\ No newline at end of file diff --git a/img/yes.svg b/img/yes.svg deleted file mode 100644 index 964624a9..00000000 --- a/img/yes.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="16px" viewBox="-0.5 -0.5 16 16" width="16px" version="1.1" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" enable-background="new -0.5 -0.5 16 16" overflow="visible" xmlns:dc="http://purl.org/dc/elements/1.1/"> -<path fill="#fff" transform="translate(-.5 -.5)" d="m12.438 3.6875c-0.363 0-0.726 0.1314-1 0.4063l-4.5005 4.5-1.9687-2c-0.5498-0.5484-1.4489-0.5498-2 0l-0.5 0.5c-0.5512 0.5496-0.5512 1.4502 0 2l2.9687 2.9682c0.0063 0.007-0.0065 0.025 0 0.032l0.5 0.5c0.5497 0.55 1.4503 0.55 2 0l0.5-0.5 0.1875-0.219 5.313-5.2812c0.549-0.5498 0.549-1.4503 0-2l-0.5-0.5c-0.275-0.2749-0.638-0.4063-1-0.4063z"/> -</svg> @@ -18,8 +18,14 @@ $(document).ready(function () { var arr_years = []; // [1992] => 6 var prev = ''; var dateStr = ''; + + $('.poll.avatardiv').each(function(i, obj) { + $(obj).avatar(obj.title, 32); + }); + + $('.hidden-dates').each(function(i, obj) { - var exDt = new Date(obj.value.replace(/ /g,"T")+"Z"); + var exDt = new Date(obj.value.replace(/ /g,"T")+"Z"); //Fix display in Safari and IE, still NaN on Firefox on iPad var day = ('0' + exDt.getDate()).substr(-2); var month = ('0' + (exDt.getMonth()+1)).substr(-2); var day_month = day + '.' + month; @@ -38,7 +44,14 @@ $(document).ready(function () { var c = (prev != (year + day_month) ? ' bordered' : ''); prev = (year + day_month); var ch_obj = ('0' + (exDt.getHours())).substr(-2) + ':' + ('0' + exDt.getMinutes()).substr(-2) - dateStr += '<th class="time-slot-cell' + c + '">' + ch_obj + '</th>'; + dateStr += '<th class="time-slot" value="' + obj.value + '"> ' + + '<div class="month">' + exDt.toLocaleString(window.navigator.language, {month: 'short'}) + + // ' \'' + exDt.toLocaleString(window.navigator.language, {year: '2-digit'}) + + '</div>' + + '<div class="day">' + exDt.toLocaleString(window.navigator.language, {day: 'numeric'}) + '</div>' + + '<div class="dayow">' + exDt.toLocaleString(window.navigator.language, {weekday: 'short'}) + '</div>' + + '<div class="time">' + ('0' + (exDt.getHours())).substr(-2) + ':' + ('0' + exDt.getMinutes()).substr(-2) + '</div>' + + '</th>'; }); var for_string_dates = ''; @@ -51,10 +64,7 @@ $(document).ready(function () { for_string_years += '<th colspan="' + arr_years[k] + '" class="bordered">' + k + '</th>'; } - $(for_string_years).insertAfter('.year-row'); - $('.date-row').append(for_string_dates); - $('#time-row-header').append(dateStr); - $(dateStr).insertAfter('#time-row-footer'); + $('#time-slots-header').append(dateStr); $('#submit_finish_vote').click(function() { var form = document.finish_vote; @@ -70,20 +80,20 @@ $(document).ready(function () { check_notif = document.getElementById('check_notif'); var newUserDates = [], newUserTypes = []; $(".cl_click").each(function() { - if($(this).hasClass('poll-cell-active-not')) { + if($(this).hasClass('no')) { newUserTypes.push(0); - } else if ($(this).hasClass('poll-cell-active-is')){ + } else if ($(this).hasClass('yes')){ newUserTypes.push(1); - } else if($(this).hasClass('poll-cell-active-maybe')){ + } else if($(this).hasClass('maybe')){ newUserTypes.push(2); } else { newUserTypes.push(-1); } - var userDate = $(this).attr('id'); - if(isNaN($(this).attr('id')) ) { - newUserDates.push($(this).attr('id')); + var userDate = $(this).attr('data-value'); + if(isNaN($(this).attr('data-value')) ) { + newUserDates.push($(this).attr('data-value')); } else { - newUserDates.push(parseInt($(this).attr('id'))); + newUserDates.push(parseInt($(this).attr('data-value'))); } }); form.elements['dates'].value = JSON.stringify(newUserDates); @@ -133,27 +143,32 @@ $(document).ready(function () { $(document).on('click', '.toggle-all, .cl_click', function(e) { values_changed = true; - var cl = ""; - if($(this).hasClass('poll-cell-active-is')) { - cl = "not"; - } else if($(this).hasClass('poll-cell-active-not')) { - cl = "maybe"; - } else if($(this).hasClass('poll-cell-active-maybe')) { - cl = "is"; + var $cl = ""; + var $toggle = ""; + if($(this).hasClass('yes')) { + $cl = "no"; + $toggle= "yes"; + } else if($(this).hasClass('no')) { + $cl = "maybe"; + $toggle= "no"; + } else if($(this).hasClass('maybe')) { + $cl = "yes"; + $toggle= "maybe"; } else { - cl = "is"; + $cl = "yes"; + $toggle= "maybe"; } if($(this).hasClass('toggle-all')) { - $(".cl_click").attr('class', 'cl_click poll-cell-active-' + cl); - $(this).attr('class', 'toggle-all poll-cell-active-' + cl); + $(".cl_click").attr('class', 'cl_click poll-cell active ' + $toggle); + $(this).attr('class', 'toggle-all toggle ' + $cl); } else { - $(this).attr('class', 'cl_click poll-cell-active-' + cl); + $(this).attr('class', 'cl_click poll-cell active ' + $cl); } $('.cl_click').each(function() { var yes_c = $('#id_y_' + $(this).attr('id')); var no_c = $('#id_n_' + $(this).attr('id')); - $(yes_c).text(parseInt($(yes_c).attr('data-value')) + ($(this).hasClass('poll-cell-active-is') ? 1 : 0)); - $(no_c).text(parseInt($(no_c).attr('data-value')) + ($(this).hasClass('poll-cell-active-not') ? 1 : 0)); + $(yes_c).text(parseInt($(yes_c).attr('data-value')) + ($(this).hasClass('yes') ? 1 : 0)); + $(no_c).text(parseInt($(no_c).attr('data-value')) + ($(this).hasClass('no') ? 1 : 0)); }); updateCounts(); }); @@ -161,16 +176,16 @@ $(document).on('click', '.toggle-all, .cl_click', function(e) { function updateCounts(){ max_votes = 0; $('td.total').each(function() { - var yes = parseInt($(this).find('.color_yes').text()); - var no = parseInt($(this).find('.color_no').text()); + var yes = parseInt($(this).find('.yes').text()); + var no = parseInt($(this).find('.no').text()); if(yes - no > max_votes) { max_votes = yes - no; } }); var i = 0; $('td.total').each(function() { - var yes = parseInt($(this).find('.color_yes').text()); - var no = parseInt($(this).find('.color_no').text()); + var yes = parseInt($(this).find('.yes').text()); + var no = parseInt($(this).find('.no').text()); $('#id_total_' + i++).toggleClass('icon-checkmark', yes - no == max_votes); }); } @@ -82,9 +82,9 @@ OC.L10N.register( "Error" : "Fehler", "d.m.Y H:i" : "d.m.Y H:i", "d.m.Y" : "d.m.Y", - "Hello %s,<br/><br/><strong>%s</strong> shared the poll '%s' with you. To go directly to the poll, you can use this link: <a href="%s">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat die Umfrage '%s' mit dir geteilt. Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href="%s">%s</a>", - "Hello %s,<br/><br/><strong>%s</strong> commented on the poll '%s'.<br/><br/><i>%s</i><br/><br/>To go directly to the poll, you can use this link: <a href="%s">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat die Umfrage '%s' kommentiert.<br/><br/><i>%s</i><br/><br/>Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href="%s">%s</a>", - "Hello %s,<br/><br/><strong>%s</strong> participated in the poll '%s'.<br/><br/>To go directly to the poll, you can use this link: <a href="%s">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat an der Umfrage '%s' teilgenommen.<br/><br/>Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href="%s">%s</a>", + "Hello %s,<br/><br/><strong>%s</strong> shared the poll '%s' with you. To go directly to the poll, you can use this link: <a href=\"%s\">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat die Umfrage '%s' mit dir geteilt. Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href=\"%s\">%s</a>", + "Hello %s,<br/><br/><strong>%s</strong> commented on the poll '%s'.<br/><br/><i>%s</i><br/><br/>To go directly to the poll, you can use this link: <a href=\"%s\">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat die Umfrage '%s' kommentiert.<br/><br/><i>%s</i><br/><br/>Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href=\"%s\">%s</a>", + "Hello %s,<br/><br/><strong>%s</strong> participated in the poll '%s'.<br/><br/>To go directly to the poll, you can use this link: <a href=\"%s\">%s</a>" : "Hallo %s,<br/><br/><strong>%s</strong> hat an der Umfrage '%s' teilgenommen.<br/><br/>Um direkt zur Umfrage zu gelangen, kannst du diesen Link verwenden: <a href=\"%s\">%s</a>", "ownCloud Polls -- New Comment" : "ownCloud Umfragen -- Neuer Kommentar", "ownCloud Polls -- New Participant" : "ownCloud Umfragen -- Neuer Teilnehmer", "ownCloud Polls -- New Poll" : "ownCloud Umfragen -- Neue Umfrage", diff --git a/screenshots/nc_new_poll.png b/screenshots/nc_new_poll.png Binary files differdeleted file mode 100644 index 163609cb..00000000 --- a/screenshots/nc_new_poll.png +++ /dev/null diff --git a/screenshots/new-poll.png b/screenshots/new-poll.png Binary files differindex f9c22c41..1954f0fa 100644 --- a/screenshots/new-poll.png +++ b/screenshots/new-poll.png diff --git a/screenshots/overview.png b/screenshots/overview.png Binary files differindex 05e1eb6f..71d09ae9 100644 --- a/screenshots/overview.png +++ b/screenshots/overview.png diff --git a/screenshots/vote.png b/screenshots/vote.png Binary files differindex 200e48b4..4d5dc21d 100644 --- a/screenshots/vote.png +++ b/screenshots/vote.png diff --git a/templates/create.tmpl.php b/templates/create.tmpl.php index beb8d93e..f7a9160b 100644 --- a/templates/create.tmpl.php +++ b/templates/create.tmpl.php @@ -1,6 +1,8 @@ <?php + use \OCP\User; + \OCP\Util::addStyle('polls', 'main'); - \OCP\Util::addStyle('polls', 'create'); + \OCP\Util::addStyle('polls', 'createpoll'); \OCP\Util::addStyle('polls', 'jquery.datetimepicker'); \OCP\Util::addScript('polls', 'create_edit'); \OCP\Util::addScript('polls', 'jquery.datetimepicker.full.min'); @@ -36,8 +38,27 @@ ?> <div id="app"> - <div id="app-content"> + <div id="app-content"> <div id="app-content-wrapper"> + <div id="controls"> + <div id="breadcrump"> + <div class="crumb svg" data-dir="/"> + <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>"> + <img class="svg" src="<?php print_unescaped(OCP\image_path("core", "places/home.svg")); ?>" alt="Home"> + </a> + </div> + <div class="crumb svg last"> + <span> + <?php if($isUpdate): ?> + <?php p($l->t('Edit poll') . ' ' . $poll->getTitle()); ?> + <?php else: ?> + <?php p($l->t('Create new poll')); ?> + <?php endif; ?> + </span> + </div> + </div> + </div> + <?php if($isUpdate): ?> <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.update_poll')); ?>" method="POST"> <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" /> @@ -49,18 +70,10 @@ <input type="hidden" name="userId" id="userId" value="<?php p($userId); ?>" /> <header class="row"> - <div class="col-100"> - <?php if($isUpdate): ?> - <h1><?php p($l->t('Edit poll') . ' ' . $poll->getTitle()); ?></h1> - <?php else: ?> - <h1><?php p($l->t('Create new poll')); ?></h1> - <?php endif; ?> - </div> </header> <div class="new_poll row"> <div class="col-50"> - <h2><?php p($l->t('Basic information')); ?></h2> <label for="pollTitle" class="input_title"><?php p($l->t('Title')); ?></label> <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if(isset($title)) p($title); ?>" /> <label for="pollDesc" class="input_title"><?php p($l->t('Description')); ?></label> @@ -95,15 +108,6 @@ <input type="hidden" name="accessValues" id="accessValues" value="<?php if($isUpdate && $access === 'select') p($accessTypes) ?>" /> - <label class="input_title"><?php p($l->t('Type')); ?></label> - - <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if(!$isUpdate || $poll->getType() == '0') print_unescaped('checked'); ?> /> - <label for="event"><?php p($l->t('Event schedule')); ?></label> - - <!-- TODO texts to db --> - <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if($isUpdate && $poll->getType() == '1') print_unescaped('checked'); ?>> - <label for="text"><?php p($l->t('Text based')); ?></label> - <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); ?> /> <label for="isAnonymous" class="input_title"><?php p($l->t('Anonymous')) ?></label> @@ -119,7 +123,14 @@ </div> </div> <div class="col-50"> - <h2><?php p($l->t('Choices')); ?></h2> + + <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if(!$isUpdate || $poll->getType() == '0') print_unescaped('checked'); ?> /> + <label for="event"><?php p($l->t('Event schedule')); ?></label> + + <!-- TODO texts to db --> + <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if($isUpdate && $poll->getType() == '1') print_unescaped('checked'); ?>> + <label for="text"><?php p($l->t('Text based')); ?></label> + <div id="date-select-container" <?php if($isUpdate && $poll->getType() == '1') print_unescaped('style="display:none;"'); ?> > <label for="datetimepicker" class="input_title"><?php p($l->t('Dates')); ?></label> <input id="datetimepicker" type="text" /> diff --git a/templates/goto.tmpl.php b/templates/goto.tmpl.php index b37498f7..569e019f 100644 --- a/templates/goto.tmpl.php +++ b/templates/goto.tmpl.php @@ -1,29 +1,30 @@ <?php -use \OCP\User; + use \OCP\User; -\OCP\Util::addStyle('polls', 'main'); -\OCP\Util::addStyle('polls', 'vote'); -\OCP\Util::addScript('polls', 'vote'); + \OCP\Util::addStyle('polls', 'main'); + \OCP\Util::addStyle('polls', 'vote'); + \OCP\Util::addScript('polls', 'vote'); + + $layout = "classic"; + $userId = $_['userId']; + $userMgr = $_['userMgr']; + $urlGenerator = $_['urlGenerator']; + $avaMgr = $_['avatarManager']; -$userId = $_['userId']; -$userMgr = $_['userMgr']; -$urlGenerator = $_['urlGenerator']; -$avaMgr = $_['avatarManager']; + $poll = $_['poll']; + $dates = $_['dates']; + $votes = $_['votes']; + $comments = $_['comments']; + $isAnonymous = $poll->getIsAnonymous() && $userId != $poll->getOwner(); + $hideNames = $poll->getIsAnonymous() && $poll->getFullAnonymous(); + $notification = $_['notification']; -$poll = $_['poll']; -$dates = $_['dates']; -$votes = $_['votes']; -$comments = $_['comments']; -$isAnonymous = $poll->getIsAnonymous() && $userId != $poll->getOwner(); -$hideNames = $poll->getIsAnonymous() && $poll->getFullAnonymous(); -$notification = $_['notification']; - -if ($poll->getExpire() === null) { - $expired = false; -} else { - $expired = time() > strtotime($poll->getExpire()); -} + if ($poll->getExpire() === null) { + $expired = false; + } else { + $expired = time() > strtotime($poll->getExpire()); + } ?> @@ -54,51 +55,46 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => <div id="app"> <div id="app-content"> - <div id="app-content-wrapper"> - <?php if(!User::isLoggedIn()) : ?> - <div class="row"> + <div id="app-content-wrapper" class="<?php p($layout); ?>"> + <div id="controls"> + <div id="breadcrump"> + <?php if(User::isLoggedIn()) : ?> + <div class="crumb svg" data-dir="/"> + <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>"> + <img class="svg" src="<?php print_unescaped(OCP\image_path("core", "places/home.svg")); ?>"" alt="Home"> + </a> + </div> + <div class="crumb svg last"> + <span><?php p($poll->getTitle()); ?></span> + </div> + <?php endif; ?> + + <?php if(!User::isLoggedIn()) : ?> <div class="col-100"> - <div class="alert-info"> - <?php - p($l->t('Already have an account?')); - $loginUrl = OCP\Util::linkToAbsolute('', 'index.php' ) . '?redirect_url=' . $urlGenerator->linkToRoute('polls.page.goto_poll', ['hash' => $poll->getHash()]); - ?> - <a href="<?php p($loginUrl); ?>"><?php p($l->t('Login')); ?></a> - </div> + <h2><?php p($poll->getTitle()); ?></h2> </div> - </div> - <?php endif; ?> + <?php endif; ?> + </div> + </div> <header class="row"> - <div class="col-100"> - <h1><?php p($poll->getTitle()); ?></h1> - <div class="wordwrap desc"><?php print_unescaped($description); ?></div> - </div> </header> <div class="row"> <div class="col-70"> - <h2><?php p($l->t('Poll')); ?></h2> + <div class="wordwrap desc"><?php p($description); ?></div> <div class="scroll_div"> - <table class="vote_table" id="id_table_1"> + <table class="vote_table"> <thead> - <tr> <?php if ($poll->getType() == '0') { - print_unescaped('<th rowspan=3 class="year-row"></th>'); - print_unescaped('<th class="bordered" rowspan=3>' . $l->t('All') . '</th>'); + print_unescaped('<tr id="time-slots-header"><th class="first_header_cell" colspan="3"></th>'); } else { - print_unescaped('<th></th>'); + print_unescaped('<tr id="vote-options-header"><th class="first_header_cell" colspan="3"></th>'); foreach ($dates as $el) { - print_unescaped('<th title="' . preg_replace('/_\d+$/', '', $el->getText()) . '" class="bordered">' . preg_replace('/_\d+$/', '', $el->getText()) . '</th>'); + print_unescaped('<th title="' . preg_replace('/_\d+$/', '', $el->getText()) . '" class="vote-option">' . preg_replace('/_\d+$/', '', $el->getText()) . '</th>'); } - print_unescaped('<th class="bordered">' . $l->t('All') . '</th>'); } + print_unescaped('</tr>'); ?> - </tr> - <?php - if ($poll->getType() == '0'){ - print_unescaped('<tr class="date-row"></tr><tr id="time-row-header"></tr>'); - } - ?> </thead> <tbody class="votes"> <?php @@ -123,32 +119,35 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => } } print_unescaped('<tr>'); + print_unescaped('<td class="avatar-cell">'); if($userMgr->get($usr) != null && !$isAnonymous && !$hideNames) { - print_unescaped('<th class="user-cell">'); - $avatar = $avaMgr->getAvatar($usr)->get(32); - if($avatar !== false) { - print_unescaped('<img class="userNameImg" src="data:' . $avatar->mimeType() . ';base64,' . $avatar . '" />'); - } else { - print_unescaped('<div class="userNameImg noAvatar" style="background-color:' . getHsl($usr) . ';">' . strtoupper($usr[0]) . '</div>'); - } + print_unescaped('<div class="poll avatardiv" title="'.($usr).'"></div>'); + print_unescaped('</td>'); + print_unescaped('<td colspan="2" class="name">'); p($userMgr->get($usr)->getDisplayName()); } else { if($isAnonymous || $hideNames) { - print_unescaped('<th class="user-cell anonymous">'); - p($l->t('Participent') . ' ' . $userCnt); + print_unescaped('<div class="poll avatardiv" title="'.($userCnt).'"></div>'); + print_unescaped('</td>'); + print_unescaped('<td colspan="2" class="name">'); } else { - print_unescaped('<th class="user-cell external">'. $usr); + print_unescaped('<div class="poll avatardiv" title="'.($usr).'"></div>'); + print_unescaped('</td>'); + print_unescaped('<td colspan="2" class="name">'); + p($usr); } } - print_unescaped('</th>'); + print_unescaped('</td>'); // loop over dts $i_tot = 0; foreach($dates as $dt) { if ($poll->getType() == '0') { $date_id = strtotime($dt->getDt()); + $poll_id = "pollid_" . $dt->getId(); } else { $date_id = $dt->getText(); + $poll_id = "pollid_" . $dt->getId(); } // look what user voted for this dts $found = false; @@ -161,25 +160,29 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => } if ($date_id === $voteVal) { if ($vote->getType() == '1') { - $cl = 'poll-cell-is'; + $cl = 'poll-cell yes'; $total_y[$i_tot]++; } else if ($vote->getType() == '0') { - $cl = 'poll-cell-not'; + $cl = 'poll-cell no'; $total_n[$i_tot]++; + } else if ($vote->getType() == '2') { + $cl = 'poll-cell maybe'; } else { - $cl = 'poll-cell-maybe'; + $cl = 'poll-cell unvoted'; } $found = true; break; } } if(!$found) { - $cl = 'poll-cell-un'; + $cl = 'poll-cell unvoted'; } - print_unescaped('<td class="' . $cl . '"></td>'); + // Make the td clickable + print_unescaped('<td class="' . $cl . '"><div></div></td>'); + // Make the div clickable + // print_unescaped('<td><div class="' . $cl . '"></div></td>'); $i_tot++; } - print_unescaped('<td></td>'); print_unescaped('</tr>'); } } @@ -187,28 +190,30 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => $total_n_others = array_merge(array(), $total_n); if (!$expired) { print_unescaped('<tr class="current-user">'); + print_unescaped('<td class="avatar-cell">'); if (User::isLoggedIn()) { - print_unescaped('<th class="user-cell">'); - $avatar = $avaMgr->getAvatar($userId)->get(32); - if($avatar !== false) { - print_unescaped('<img class="userNameImg" src="data:' . $avatar->mimeType() . ';base64,' . $avatar . '" />'); - } else { - print_unescaped('<div class="userNameImg noAvatar" style="background-color:' . getHsl($userId) . ';">' . strtoupper($userId[0]) . '</div>'); - } + print_unescaped('<div class="poll avatardiv" title="'.($userId).'"></div>'); + print_unescaped('</td>'); + print_unescaped('<td class="name">'); p($userMgr->get($userId)->getDisplayName()); - print_unescaped('</th>'); } else { - print_unescaped('<th id="id_ac_detected" class="external current-user"><input type="text" name="user_name" id="user_name" placeholder="' . $l->t('Your name here') . '" /></th>'); + print_unescaped('<div class="poll avatardiv" title="?"></div>'); + print_unescaped('</td>'); + print_unescaped('<td id="id_ac_detected" class="external current-user"><input type="text" name="user_name" id="user_name" placeholder="' . $l->t('Your name here') . '" />'); } + print_unescaped('</td><td class="toggle-all toggle maybe"><div id="toggle" class=""></div><img class="svg" src="../../../../core/img/actions/play-next.svg" "="" alt=""></td>'); + // print_unescaped('</td><td class="toggle-cell"><div id="toggle" class="toggle-all toggle maybe"></div><img class="svg" src="../../../../core/img/actions/play-next.svg" "="" alt=""></td>'); $i_tot = 0; foreach ($dates as $dt) { if ($poll->getType() == '0') { $date_id = strtotime($dt->getDt()); + $poll_id = "pollid_" . $dt->getId(); } else { $date_id = $dt->getText(); + $poll_id = "pollid_" . $dt->getId(); } // see if user already has data for this event - $cl = 'poll-cell-active-un'; + $cl = 'poll-cell active unvoted '; if (isset($user_voted)) { foreach ($user_voted as $obj) { $voteVal = null; @@ -219,26 +224,29 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => } if ($voteVal === $date_id) { if ($obj->getType() == '1') { - $cl = 'poll-cell-active-is'; + $cl = 'poll-cell active yes'; $total_y[$i_tot]++; } else if ($obj->getType() == '0') { - $cl = 'poll-cell-active-not'; + $cl = 'poll-cell active no'; $total_n[$i_tot]++; } else if($obj->getType() == '2'){ - $cl = 'poll-cell-active-maybe'; + $cl = 'poll-cell active maybe'; } break; } } } - print_unescaped('<td class="cl_click ' . $cl . '" id="' . $date_id . '"></td>'); + // Make the td clickable + print_unescaped('<td id="' . $poll_id . '" class="cl_click ' . $cl . '" data-value="' . $date_id . '"><div></div></td>'); + // Make the div clickable + // print_unescaped('<td><div id="' . $date_id . '" class="cl_click ' . $cl . '"></div></td>'); + $i_tot++; } - print_unescaped('<td class="toggle-all selected-maybe"></td></tr>'); } ?> </tbody> - <tbody class="total"> + <tbody class="summary"> <?php $diff_array = $total_y; for($i = 0 ; $i < count($diff_array) ; $i++) { @@ -246,30 +254,29 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => } $max_votes = max($diff_array); ?> - <tr> - <th><?php p($l->t('Total')); ?></th> + <tr class="total"> + <th colspan="3"><?php p($l->t('Total')); ?></th> <?php for ($i = 0 ; $i < count($dates) ; $i++) : ?> <td class="total"> <?php - $classSuffix = $poll->getType() == '0' ? strtotime($dates[$i]->getDt()) : str_replace(' ', '_', $dates[$i]->getText()); + $classSuffix = "pollid_" . $dates[$i]->getId(); if (isset($total_y[$i])) { $val = $total_y[$i]; } else { $val = 0; } ?> - <div id="id_y_<?php p($classSuffix); ?>" class="color_yes" data-value=<?php p(isset($total_y_others[$i]) ? $total_y_others[$i] : '0'); ?>> + <div id="id_y_<?php p($classSuffix); ?>" class="result-cell yes" data-value=<?php p(isset($total_y_others[$i]) ? $total_y_others[$i] : '0'); ?>> <?php p($val); ?> </div> - <div id="id_n_<?php p($classSuffix); ?>" class="color_no" data-value=<?php p(isset($total_n_others[$i]) ? $total_n_others[$i] : '0'); ?>> + <div id="id_n_<?php p($classSuffix); ?>" class="result-cell no" data-value=<?php p(isset($total_n_others[$i]) ? $total_n_others[$i] : '0'); ?>> <?php p(isset($total_n[$i]) ? $total_n[$i] : '0'); ?> </div> </td> <?php endfor; ?> - <td></td> </tr> - <tr> - <th><?php p($l->t('Best option')); ?></th> + <tr class="best"> + <th colspan="3"><?php p($l->t('Best option')); ?></th> <?php for ($i = 0; $i < count($dates); $i++) { $check = ''; @@ -279,58 +286,34 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => print_unescaped('<td class="win_row ' . $check . '" id="id_total_' . $i . '"></td>'); } ?> - <td class="bordered"></td> </tr> </tbody> - <tfoot> - <?php - if ($poll->getType() == '0') { - print_unescaped('<tr><th rowspan=3 id="time-row-footer"></th>'); - print_unescaped('<th rowspan=3 class="bordered">' . $l->t('All') . '</th></tr>'); - print_unescaped('<tr class="date-row"></tr>'); - } - ?> - <tr> - <?php - if ($poll->getType() == '0') { - print_unescaped('<th colspan=0 class="year-row" style="display: none;"></th>'); - } else { - print_unescaped('<th></th>'); - foreach ($dates as $el) { - print_unescaped('<th title="' . preg_replace('/_\d+$/', '', $el->getText()) . '" class="bordered">' . preg_replace('/_\d+$/', '', $el->getText()) . '</th>'); - } - print_unescaped('<th class="bordered"></th>'); - } - ?> - </tr> - </tfoot> </table> + <form class="finish_vote" name="finish_vote" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_vote')); ?>" method="POST"> + <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" /> + <input type="hidden" name="userId" value="<?php p($userId); ?>" /> + <input type="hidden" name="dates" value="<?php p($poll->getId()); ?>" /> + <input type="hidden" name="types" value="<?php p($poll->getId()); ?>" /> + <input type="hidden" name="notif" /> + <input type="hidden" name="changed" /> + <input type="button" id="submit_finish_vote" class="button btn" value="<?php p($l->t('Vote!')); ?>" /> + </form> + <?php if(User::isLoggedIn()) : ?> + <span class="notification"> + <input type="checkbox" id="check_notif" class="checkbox" <?php if($notification !== null) print_unescaped(' checked'); ?> /> + <label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label> + </span> + <?php endif; ?> </div> + </div> + <div class="col-30"> <div class="input-group share"> <div class="input-group-addon"> <span class="icon-share"></span><?php p($l->t('Link')); ?> </div> <input type="text" value="<?php p($pollUrl);?>" readonly="readonly"> </div> - <?php if(User::isLoggedIn()) : ?> - <p> - <input type="checkbox" id="check_notif" class="checkbox" <?php if($notification !== null) print_unescaped(' checked'); ?> /> - <label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label> - </p> - <?php endif; ?> - <form name="finish_vote" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_vote')); ?>" method="POST"> - <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" /> - <input type="hidden" name="userId" value="<?php p($userId); ?>" /> - <input type="hidden" name="dates" value="<?php p($poll->getId()); ?>" /> - <input type="hidden" name="types" value="<?php p($poll->getId()); ?>" /> - <input type="hidden" name="notif" /> - <input type="hidden" name="changed" /> - <input type="button" id="submit_finish_vote" class="button btn" value="<?php p($l->t('Vote!')); ?>" /> - <?php if(User::isLoggedIn()) : ?> - <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>" class="button home-link"><?php p($l->t('Polls summary')); ?></a> - <?php endif; ?> - </form> <?php if($expired) : ?> @@ -341,8 +324,6 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => </p> </div> <?php endif; ?> - </div> - <div class="col-30"> <h2><?php p($l->t('Comments')); ?></h2> <div class="comments"> <div class="comment new-comment"> @@ -400,6 +381,7 @@ $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', ['hash' => </div> </div> </div> + </div> <?php diff --git a/templates/main.tmpl.php b/templates/main.tmpl.php index 22671503..b159219f 100644 --- a/templates/main.tmpl.php +++ b/templates/main.tmpl.php @@ -1,126 +1,157 @@ <?php + + use OCP\User; + \OCP\Util::addStyle('polls', 'main'); \OCP\Util::addStyle('polls', 'list'); \OCP\Util::addScript('polls', 'start'); - use OCP\User; + $userId = $_['userId']; $userMgr = $_['userMgr']; $urlGenerator = $_['urlGenerator']; ?> -<div id="app"> + <div id="app-content"> <div id="app-content-wrapper"> - <header class="row"> - <div class="col-100"> - <h1><?php p($l->t('Summary')); ?></h1> - </div> - </header> - <div class="goto_poll col-100"> + <div id="controls"> + <div id="breadcrump"> + <div class ="crumb svg last" data-dir="/"> + <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>"> + <img class="svg" src="<?php print_unescaped(OCP\image_path("core", "places/home.svg")); ?>" alt="Home"> + </a> + </div> + </div> + <div class="actions creatable" style=""> + <a href="<?php p($urlGenerator->linkToRoute('polls.page.create_poll')); ?>" class="button new"> + <span class="icon icon-add"></span><span class="hidden-visually">Neu</span> + </a> + <input class="stop icon-close" style="display:none" value="" type="button"> + </div> + </div> <?php if(count($_['polls']) === 0) : ?> - <?php p($l->t('No existing polls.')); ?> + <div id="emptycontent" class=""> + <div class="icon-polls"></div> + <h2><?php p($l->t('No existing polls.')); ?></h2> + </div> <?php else : ?> - <table class="cl_create_form"> - <thead> - <tr> - <th><?php p($l->t('Title')); ?></th> - <th id="id_th_descr"><?php p($l->t('Description')); ?></th> - <th><?php p($l->t('Created')); ?></th> - <th><?php p($l->t('By')); ?></th> - <th><?php p($l->t('Expires')); ?></th> - <th><?php p($l->t('participated')); ?></th> - <th id="id_th_descr"><?php p($l->t('Access')); ?></th> - <th><?php p($l->t('Options')); ?></th> - </tr> - </thead> - <tbody> - <?php foreach ($_['polls'] as $poll) : ?> - <?php - if (!userHasAccess($poll, $userId)) continue; - // direct url to poll - $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', array('hash' => $poll->getHash())); - ?> - <tr> - <td title="<?php p($l->t('Go to')); ?>"> - <a class="table_link" href="<?php p($pollUrl); ?>"><?php p($poll->getTitle()); ?></a> - </td> - <?php - $desc_str = $poll->getDescription(); - if($desc_str === null) $desc_str = $l->t('No description provided.'); - if (strlen($desc_str) > 100){ - $desc_str = substr($desc_str, 0, 80) . '...'; - } - ?> - <td><?php p($desc_str); ?></td> - <td><?php p(date('d.m.Y H:i', strtotime($poll->getCreated()))); ?></td> - <td> + <table class="polltable has-controls"> + <thead> + <tr> + <th id="headerName" class="columnheader name"> + <div id="headerName-container"> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Title')); ?></span><span class="sort-indicator"></span></a> + </div> + </th> + <th id="headerCreated" class="columnheader created"> + <a class="name sort columntitle" data-sort="created"><span><?php p($l->t('Created')); ?></span><span class="sort-indicator"></span></a> + </th> + <th id="headerPrincipal" class="columnheader principal"> + <a class="name sort columntitle" data-sort="principal"><span><?php p($l->t('By')); ?></span><span class="sort-indicator"></span></a> + </th> + <th id="headerExpiry" class="columnheader expiry"> + <a class="name sort columntitle" data-sort="expiry"><span><?php p($l->t('Expires')); ?></span><span class="sort-indicator"></span></a> + </th> + <th id="headerParticipations" class="columnheader participations"> + <a class="name sort columntitle" data-sort="voted"><span><?php p($l->t('participated')); ?></span><span class="sort-indicator"></span></a> + </th> + <th id="headerAccess" class="columnheader access"> + <a class="name sort columntitle" data-sort="access"><span><?php p($l->t('Access')); ?></span><span class="sort-indicator"></span></a> + </th> + <th id="headerOptions" class="columnheader options"> + <a class="name columntitle" <span><?php p($l->t('Options')); ?></span><span class="sort-indicator"></span></a> + </th> + </tr> + </thead> + <tbody id="polllist"> + <?php foreach ($_['polls'] as $poll) : ?> <?php - if($poll->getOwner() === $userId) p($l->t('Yourself')); - else p($userMgr->get($poll->getOwner())); - ?> - </td> - <?php - if ($poll->getExpire() !== null) { - $style = ''; - if (date('U') > strtotime($poll->getExpire())) { - $style = ' style="color: red"'; + if (!userHasAccess($poll, $userId)) continue; + // direct url to poll + $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', array('hash' => $poll->getHash())); + $desc_str = $poll->getDescription(); + if (strlen($desc_str) > 100){ + $desc_str = substr($desc_str, 0, 80) . '...'; } - print_unescaped('<td' . $style . '>' . date('d.m.Y', strtotime($poll->getExpire())) . '</td>'); - } - else { - print_unescaped('<td>' . $l->t('Never') . '</td>'); - } - ?> - <td> - <?php - $partic_class = 'partic_no'; - $partic_polls = $_['participations']; - for($i = 0; $i < count($partic_polls); $i++){ - if($poll->getId() == intval($partic_polls[$i]->getPollId())){ - $partic_class = 'partic_yes'; - array_splice($partic_polls, $i, 1); - break; - } - } - ?> - <div class="partic_all <?php p($partic_class); ?>"> - </div> - | - <?php - $partic_class = 'partic_no'; - $partic_comm = $_['comments']; - for($i = 0; $i < count($partic_comm); $i++){ - if($poll->getId() === intval($partic_comm[$i]->getPollId())){ - $partic_class = 'partic_yes'; - array_splice($partic_comm, $i, 1); - break; - } - } - ?> - <div class="partic_all <?php p($partic_class); ?>"> - </div> - </td> - <td> - <?php p($l->t($poll->getAccess())); ?> - </td> - <td> - <?php if ($poll->getOwner() === $userId) : ?> - <input type="button" id="id_del_<?php p($poll->getId()); ?>" class="table_button cl_delete icon-delete"></input> - <a href="<?php p($urlGenerator->linkToRoute('polls.page.edit_poll', ['hash' => $poll->getHash()])); ?>"><input type="button" id="id_edit_<?php p($poll->getId()); ?>" class="table_button cl_edit icon-rename"></input></a> - <?php endif; ?> - <input type="button" class="table_button cl_link icon-public" data-url="<?php p($pollUrl); ?>" title="<?php p($l->t('Click to get link')); ?>"></input> - </td> - </tr> - <?php endforeach; ?> - </tbody> - </table> - <form id="form_delete_poll" name="form_delete_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.delete_poll')); ?>" method="POST"> - </form> + ?> + <tr> + <td class="pollitem name"> + <div class="thumbnail progress"></div> <!-- Image to display status or type of poll */ --> + <a class="name" href="<?php p($pollUrl); ?>"> + <div class="nametext"> + <div class="innernametext"><?php p($poll->getTitle()); ?></div> + <div class="description"><?php p($desc_str); ?></div> + </div> + </a> + </td> + <td class="pollitem created"><?php p(date('d.m.Y H:i', strtotime($poll->getCreated()))); ?></td> + <td class="pollitem principal"> + <?php + if($poll->getOwner() === $userId) p($l->t('Yourself')); + else p($userMgr->get($poll->getOwner())); + ?> + </td> + <?php + if ($poll->getExpire() !== null) { + $style = ''; + if (date('U') > strtotime($poll->getExpire())) { + $style = 'expired'; + } + print_unescaped('<td class="pollitem expiry ' . $style . '">' . date('d.m.Y', strtotime($poll->getExpire())) . '</td>'); + } + else { + print_unescaped('<td class="pollitem expiry">' . $l->t('Never') . '</td>'); + } + ?> + <td class="pollitem participations"> + <?php + $partic_class = 'partic_no'; + $partic_polls = $_['participations']; + for($i = 0; $i < count($partic_polls); $i++){ + if($poll->getId() == intval($partic_polls[$i]->getPollId())){ + $partic_class = 'partic_yes'; + array_splice($partic_polls, $i, 1); + break; + } + } + ?> + <div class="partic_all <?php p($partic_class); ?>"> + </div> + | + <?php + $partic_class = 'partic_no'; + $partic_comm = $_['comments']; + for($i = 0; $i < count($partic_comm); $i++){ + if($poll->getId() === intval($partic_comm[$i]->getPollId())){ + $partic_class = 'partic_yes'; + array_splice($partic_comm, $i, 1); + break; + } + } + ?> + <div class="partic_all <?php p($partic_class); ?>"> + </div> + </td> + <td class="pollitem access"> + <?php p($l->t($poll->getAccess())); ?> + </td> + <td class="pollitem options"> + <?php if ($poll->getOwner() === $userId) : ?> + <input type="button" id="id_del_<?php p($poll->getId()); ?>" class="table_button cl_delete icon-delete action permanent"></input> + <a href="<?php p($urlGenerator->linkToRoute('polls.page.edit_poll', ['hash' => $poll->getHash()])); ?>"><input type="button" id="id_edit_<?php p($poll->getId()); ?>" class="table_button icon-rename action permanent"></input></a> + <?php endif; ?> + <input type="button" class="table_button cl_link icon-public action permanent" data-url="<?php p($pollUrl); ?>" title="<?php p($l->t('Click to get link')); ?>"></input> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <form id="form_delete_poll" name="form_delete_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.delete_poll')); ?>" method="POST"> + </form> <?php endif; ?> - <a href="<?php p($urlGenerator->linkToRoute('polls.page.create_poll')); ?>"><input type="button" id="submit_new_poll" class="icon-add" /></a> -</div> -</div> -</div> -</div> + + </div> + </div> + <?php // ---- helper functions ---- @@ -166,7 +197,3 @@ function userHasAccess($poll, $userId) { return false; } ?> - - - - |