summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/global.pl1
-rw-r--r--data/js/main.js1
-rw-r--r--data/js/polls.js26
-rw-r--r--data/lang.txt57
-rw-r--r--data/style.css18
5 files changed, 103 insertions, 0 deletions
diff --git a/data/global.pl b/data/global.pl
index 1e3f90dc..29f1a6c9 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -114,6 +114,7 @@ our %S;
posts => [ 25, 'VNDB Recent Posts', '/t' ],
},
staff_roles => [qw|scenario chardesign art music songs director staff|],
+ poll_options => 20, # max number of options in discussion board polls
);
diff --git a/data/js/main.js b/data/js/main.js
index dc1d3b27..79a280c1 100644
--- a/data/js/main.js
+++ b/data/js/main.js
@@ -48,6 +48,7 @@ VARS = /*VARS*/;
//include charops.js
//include filter.js
//include misc.js
+//include polls.js
// VN editing (/v+/edit)
//include vnrel.js
diff --git a/data/js/polls.js b/data/js/polls.js
new file mode 100644
index 00000000..b34f0f7b
--- /dev/null
+++ b/data/js/polls.js
@@ -0,0 +1,26 @@
+function addPoll() {
+ var a = byId('poll_add');
+ setClass(a, 'hidden', false);
+ var parentNode = function(n, tag) {
+ while(n && n.nodeName.toLowerCase() != tag)
+ n = n.parentNode;
+ return n;
+ };
+ var show = function(v) {
+ setClass(parentNode(byId('poll_q'), 'tr'), 'hidden', !v);
+ setClass(parentNode(byId('poll_opt'), 'tr'), 'hidden', !v);
+ setClass(parentNode(byId('poll_max'), 'tr'), 'hidden', !v);
+ setClass(parentNode(byId('poll_preview'),'tr'), 'hidden', !v);
+ setClass(parentNode(byId('poll_recast'), 'tr'), 'hidden', !v);
+ setClass(parentNode(a, 'tr'), 'hidden', v);
+ };
+ a.onclick = function() {
+ show(true);
+ return true;
+ };
+ show(false);
+}
+
+// Discussion board polls
+if(byId('poll_add'))
+ addPoll();
diff --git a/data/lang.txt b/data/lang.txt
index 72328fee..ce63f751 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -4556,6 +4556,27 @@ es : Avanzado...
tr : Gelişmiş...
uk : Розширений режим
it : Avanzate...
+
+:_poll_novote_login
+en : You must be logged in to be able to vote.
+
+:_poll_choose
+en : You may choose up to [_1] options
+
+:_poll_vote
+en : Vote
+
+:_poll_no_votes
+en : Nobody voted yet.
+
+:_poll_results
+en : View results
+
+:_poll_total_votes
+en : [_1] [quant,_1,vote,votes] total
+
+:_poll_error
+en : Poll error
# Post edit/reply/new thread form
@@ -4715,6 +4736,30 @@ es : Mirar [url,/d9.3,d9.3] para ver los formatos permitidos
tr : Biçimlendirme kodları için [url,/d9.3,d9.3]'e bakınız.
uk : Правила розмітки читай у [url,/d9.3,d9.3].
it : Vedi [url,/d9.3,d9.3] per i codici di formattazione
+
+:_postedit_form_poll_add
+en : Add poll
+
+:_postedit_form_poll_q
+en : Poll question
+
+:_postedit_form_poll_warning
+en : All votes will be reset if any changes to the poll fields are made!
+
+:_postedit_form_poll_opt
+en : Poll options
+
+:_postedit_form_poll_optmax
+en : one per line,[br][_1] max
+
+:_postedit_form_poll_max
+en : Number of options voter is allowed to choose
+
+:_postedit_form_poll_view
+en : Allow users to view poll results before voting
+
+:_postedit_form_poll_recast
+en : Allow users to change their vote
# Browsing threads by board (/t/{board_id})
@@ -4968,6 +5013,9 @@ es : Último mensaje
tr : Son gönderi
uk : Останнє повідомлення
it : Ultimo messaggio
+
+:_threadlist_poll
+en : poll
@@ -16261,6 +16309,9 @@ es : Personaje principal inválido. Asgúrate que la ID es correcta, que el pers
tr : Geçersiz ana karakter. ID'nin doğruluğundan, ana karakterin bir başka karakterin örneği olmadığından, ve bu girdinin başka bir yerde ana karakter olarak kullanılmadığından emin olun.
uk : Неправильний головний герой. Переконайтеся у правильності ID, головний персонаж — це не втілення іншого персонажа, і що цей запис не використовується в якості головного персонажа десь ще.
it : Personaggio principale non valido. Assicurati che ID sia corretto, che il personaggio non sia un'instanza di un altro personaggio, e che questa pagina non è utilizzata come personaggio principale da un'altra parte.
+
+:_formerr_e_poll
+en : Inappropriate number of options in a poll.
:_formerr_e_usedalias
en : Can't remove an alias that is still linked to a VN.
@@ -16309,6 +16360,12 @@ es : ¡[_1] es un campo requerido!
tr : [_1] alanı gereklidir!
uk : [_1] — обов’язкове поле!
it : [_1] è un campo obbligatorio!
+
+:_formerr_min
+en : [_1]: minimum number is [_2]
+
+:_formerr_max
+en : [_1]: maximum number is [_2]
:_formerr_minlength
en : [_1]: should have at least [_2] characters
diff --git a/data/style.css b/data/style.css
index 3daffbed..f42d2a3a 100644
--- a/data/style.css
+++ b/data/style.css
@@ -314,6 +314,7 @@ div.mainbox.discussions b.boards a { color: $grayedout$; }
div.discussions td.tc2 { width: 50px; }
div.discussions td.tc3 { width: 90px; }
div.discussions td.tc4 { width: 210px; }
+div.discussions .pollflag { color: $grayedout$; padding-right: 6px; }
div.postsearch td.tc1_1 { width: 60px; padding-left: 0; padding-right: 0; text-align: right }
div.postsearch td.tc1_2 { width: 25px; padding-left: 0 }
div.postsearch td.tc2 { width: 65px; }
@@ -401,6 +402,23 @@ div#vntags { margin: 15px 30px 0 30px; border-top: 1px solid
+/***** Polls ****/
+
+.votebooth thead td { font-weight: normal; background: transparent; padding-bottom: 5px; }
+.votebooth tfoot td { padding-top: 5px }
+.votebooth td { vertical-align: middle; padding: 0 8px; }
+.votebooth { margin: 0 30px }
+.votebooth td.tc1 { padding-right: 20px }
+.votebooth td.tc2 { min-width: 220px }
+.votebooth td.tc2 div { margin: 2px; }
+.votebooth td.tc2 div.graph { float: left; height: 14px; background-color: $border$; padding: 0; }
+.votebooth td.tc3 { text-align: right; padding-right: 16px; }
+.votebooth .submit { width: 100px }
+.votebooth .option { margin-left: 8px }
+.votebooth .option.own { font-weight: bold }
+
+
+
/***** VN edit *****/
#jt_box_vn_rel table { margin-bottom: 10px; }