From e2e6ee44821fd77c540111e4fced0faf49c64d35 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Mon, 12 Jul 2010 06:08:00 +0000 Subject: [PATCH] Polls implemented --- Builder/IISMainHandler/build.txt | 2 +- Common/BBCodes/Poll.cs | 24 ++ Common/Common.csproj | 2 + Common/UBBParser.cs | 6 +- Common/actions/ChangeSet.cs | 2 + Common/dataobjects/Poll.cs | 297 ++++++++++++++++++ IISMainHandler/HandlersFactory.cs | 14 + IISMainHandler/IISMainHandler.csproj | 4 + .../handlers/request/CreatePollHandler.cs | 47 +++ .../handlers/request/VoteHandler.cs | 39 +++ .../handlers/response/CreatePollHandler.cs | 27 ++ .../handlers/response/PollHandler.cs | 32 ++ templates/Full/NewPoll.xslt | 192 +++++++++++ templates/Full/Poll.xslt | 44 +++ templates/Full/elems/PollInfo.xslt | 167 ++++++++++ templates/Full/elems/TextEditor.xslt | 5 + templates/Full/result/PollCreated.xslt | 35 +++ templates/Full/result/VoteAccepted.xslt | 31 ++ 18 files changed, 968 insertions(+), 2 deletions(-) create mode 100644 Common/BBCodes/Poll.cs create mode 100644 Common/dataobjects/Poll.cs create mode 100644 IISMainHandler/handlers/request/CreatePollHandler.cs create mode 100644 IISMainHandler/handlers/request/VoteHandler.cs create mode 100644 IISMainHandler/handlers/response/CreatePollHandler.cs create mode 100644 IISMainHandler/handlers/response/PollHandler.cs create mode 100644 templates/Full/NewPoll.xslt create mode 100644 templates/Full/Poll.xslt create mode 100644 templates/Full/elems/PollInfo.xslt create mode 100644 templates/Full/result/PollCreated.xslt create mode 100644 templates/Full/result/VoteAccepted.xslt diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index ddc27b0..eb6fa5a 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -739 \ No newline at end of file +773 \ No newline at end of file diff --git a/Common/BBCodes/Poll.cs b/Common/BBCodes/Poll.cs new file mode 100644 index 0000000..4e265ab --- /dev/null +++ b/Common/BBCodes/Poll.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using PJonDevelopment.BBCode; + +namespace FLocal.Common.BBCodes { + class Poll : BBCode { + + public Poll() + : base("poll") { + } + + public override string Format(ITextFormatter formatter) { + var poll = dataobjects.Poll.LoadById(int.Parse(this.DefaultOrValue)); + var name = poll.title; + if(this.Default != null) { + name = this.GetInnerHTML(formatter); + } + return "" + name + ""; + } + + } +} diff --git a/Common/Common.csproj b/Common/Common.csproj index 6ce5168..ae4f55c 100644 --- a/Common/Common.csproj +++ b/Common/Common.csproj @@ -67,6 +67,7 @@ + @@ -85,6 +86,7 @@ + diff --git a/Common/UBBParser.cs b/Common/UBBParser.cs index 411487a..9e62b0c 100644 --- a/Common/UBBParser.cs +++ b/Common/UBBParser.cs @@ -6,6 +6,7 @@ using System.Web; using System.Text.RegularExpressions; using PJonDevelopment.BBCode; using System.IO; +using FLocal.Core; namespace FLocal.Common { public static class UBBParser { @@ -97,6 +98,7 @@ namespace FLocal.Common { this.parser.ElementTypes.Add("image", typeof(BBCodes.Image), true); this.parser.ElementTypes.Add("list", typeof(BBCodes.List), true); this.parser.ElementTypes.Add("*", typeof(BBCodes.ListElem), false); + this.parser.ElementTypes.Add("poll", typeof(BBCodes.Poll), true); this.parser.ElementTypes.Add("quote", typeof(BBCodes.Quote), true);this.parser.ElementTypes.Add("q", typeof(BBCodes.Quote), true); this.parser.ElementTypes.Add("s", typeof(BBCodes.S), true); this.parser.ElementTypes.Add("spoiler", typeof(BBCodes.Spoiler), true);this.parser.ElementTypes.Add("cut", typeof(BBCodes.Spoiler), true); @@ -109,7 +111,9 @@ namespace FLocal.Common { } public string Parse(string input) { - return this.parser.Parse(input).Format(this.formatter); + string result = this.parser.Parse(input).Format(this.formatter); + if(result.EndsWith("
")) result = result.Substring(0, result.Length - 5); + return result; } } diff --git a/Common/actions/ChangeSet.cs b/Common/actions/ChangeSet.cs index ce40e6a..10407ed 100644 --- a/Common/actions/ChangeSet.cs +++ b/Common/actions/ChangeSet.cs @@ -31,6 +31,8 @@ namespace FLocal.Common.actions { dataobjects.PMMessage.TableSpec.TABLE, dataobjects.Thread.ReadMarkerTableSpec.TABLE, dataobjects.Board.ReadMarkerTableSpec.TABLE, + dataobjects.Poll.TableSpec.TABLE, + dataobjects.Poll.Vote.TableSpec.TABLE, dataobjects.Session.TableSpec.TABLE, } ); diff --git a/Common/dataobjects/Poll.cs b/Common/dataobjects/Poll.cs new file mode 100644 index 0000000..7a21088 --- /dev/null +++ b/Common/dataobjects/Poll.cs @@ -0,0 +1,297 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using FLocal.Core; +using FLocal.Core.DB; +using FLocal.Core.DB.conditions; +using FLocal.Common.actions; + +namespace FLocal.Common.dataobjects { + public class Poll : SqlObject { + + private class PollOptionInfo { + public string name; + public int votes; + public List voters; + public bool selected; + } + + public class TableSpec : ISqlObjectTableSpec { + public const string TABLE = "Polls"; + public const string FIELD_ID = "Id"; + public const string FIELD_TITLE = "Title"; + public const string FIELD_ISDETAILED = "IsDetailed"; + public const string FIELD_ISMULTIOPTION = "IsMultiOption"; + public const string FIELD_OPTIONS = "Options"; + public const string FIELD_POSTERID = "PosterId"; + public const string FIELD_POSTDATE = "PostDate"; + public static readonly TableSpec instance = new TableSpec(); + public string name { get { return TABLE; } } + public string idName { get { return FIELD_ID; } } + public void refreshSqlObject(int id) { Refresh(id); } + } + + public class Vote : SqlObject { + + public class TableSpec : ISqlObjectTableSpec { + public const string TABLE = "Votes"; + public const string FIELD_ID = "Id"; + public const string FIELD_POLLID = "PollId"; + public const string FIELD_USERID = "UserId"; + public const string FIELD_VOTEINFO = "VoteInfo"; + public static readonly TableSpec instance = new TableSpec(); + public string name { get { return TABLE; }} + public string idName { get { return FIELD_ID; }} + public void refreshSqlObject(int id) { } + } + + protected override ISqlObjectTableSpec table { get { return TableSpec.instance; } } + + private int _userId; + public int userId { + get { + this.LoadIfNotLoaded(); + return this._userId; + } + } + public User user { + get { + return User.LoadById(this.userId); + } + } + + private HashSet _options; + public HashSet options { + get { + this.LoadIfNotLoaded(); + return this._options; + } + } + + protected override void doFromHash(Dictionary data) { + this._userId = int.Parse(data[TableSpec.FIELD_USERID]); + this._options = new HashSet(from elem in XElement.Parse(data[TableSpec.FIELD_VOTEINFO]).Descendants("vote") select int.Parse(elem.Attribute("optionId").Value)); + } + + } + + protected override ISqlObjectTableSpec table { get { return TableSpec.instance; } } + + private string _title; + public string title { + get { + this.LoadIfNotLoaded(); + return this._title; + } + } + + private bool _isDetailed; + public bool isDetailed { + get { + this.LoadIfNotLoaded(); + return this._isDetailed; + } + } + + private bool _isMultiOption; + public bool isMultiOption { + get { + this.LoadIfNotLoaded(); + return this._isMultiOption; + } + } + + private Dictionary _options; + public Dictionary options { + get { + this.LoadIfNotLoaded(); + return this._options; + } + } + + private int _posterId; + public int posterId { + get { + this.LoadIfNotLoaded(); + return this._posterId; + } + } + public User poster { + get { + return User.LoadById(this._posterId); + } + } + + private DateTime _postDate; + public DateTime postDate { + get { + this.LoadIfNotLoaded(); + return this._postDate; + } + } + + protected override void doFromHash(Dictionary data) { + this._title = data[TableSpec.FIELD_TITLE]; + this._isDetailed = Util.string2bool(data[TableSpec.FIELD_ISDETAILED]); + this._isMultiOption = Util.string2bool(data[TableSpec.FIELD_ISMULTIOPTION]); + this._options = (from elem in XElement.Parse(data[TableSpec.FIELD_OPTIONS]).Descendants("option") select new KeyValuePair(int.Parse(elem.Attribute("id").Value), elem.Attribute("name").Value)).ToDictionary(); + this._posterId = int.Parse(data[TableSpec.FIELD_POSTERID]); + this._postDate = Util.ParseDateTimeFromTimestamp(data[TableSpec.FIELD_POSTDATE]).Value; + } + + public XElement exportToXml(UserContext context) { + return new XElement("poll", + new XElement("id", this.id), + new XElement("title", this.title), + new XElement("isDetailed", this.isDetailed.ToPlainString()), + new XElement("isMultiOption", this.isMultiOption.ToPlainString()), + new XElement( + "options", + from kvp in this.options + select new XElement( + "option", + new XElement("id", kvp.Key), + new XElement("name", kvp.Value) + ) + ), + new XElement("poster", this.poster.exportToXmlForViewing(context)), + new XElement("postDate", this.postDate.ToXml()) + ); + } + + private Dictionary GetOptionsWithVotes(User user) { + Dictionary result = this.options.ToDictionary(kvp => kvp.Key, kvp => new PollOptionInfo { name = kvp.Value, votes = 0, voters = new List(), selected = false }); + foreach( + var vote + in + Vote.LoadByIds( + from stringId in Config.instance.mainConnection.LoadIdsByConditions( + Vote.TableSpec.instance, + new ComparisonCondition( + Vote.TableSpec.instance.getColumnSpec(Vote.TableSpec.FIELD_POLLID), + ComparisonType.EQUAL, + this.id.ToString() + ), + Diapasone.unlimited + ) select int.Parse(stringId) + ) + ) { + foreach(int optionId in vote.options) { + result[optionId].votes += 1; + if(this.isDetailed) { + result[optionId].voters.Add(vote.userId); + } + } + if(user != null && vote.user.id == user.id) { + foreach(int optionId in vote.options) { + result[optionId].selected = true; + } + } + } + return result; + } + + public XElement exportToXmlWithVotes(UserContext context) { + return new XElement("poll", + new XElement("id", this.id), + new XElement("title", this.title), + new XElement("isDetailed", this.isDetailed.ToPlainString()), + new XElement("isMultiOption", this.isMultiOption.ToPlainString()), + new XElement( + "options", + from kvp in this.GetOptionsWithVotes((context.account != null) ? context.account.user : null) + select new XElement( + "option", + new XElement("id", kvp.Key), + new XElement("name", kvp.Value.name), + new XElement("isSelected", kvp.Value.selected), + new XElement("votes", kvp.Value.votes), + new XElement( + "voters", + from userId in kvp.Value.voters select User.LoadById(userId).exportToXmlForViewing(context) + ) + ), + new XElement( + "total", + Config.instance.mainConnection.GetCountByConditions( + Vote.TableSpec.instance, + new ComparisonCondition( + Vote.TableSpec.instance.getColumnSpec(Vote.TableSpec.FIELD_POLLID), + ComparisonType.EQUAL, + this.id.ToString() + ) + ) + ) + ), + new XElement("poster", this.poster.exportToXmlForViewing(context)), + new XElement("postDate", this.postDate.ToXml()) + ); + } + + public void GiveVote(User user, HashSet options) { + foreach(int option in options) { + if(!this.options.ContainsKey(option)) throw new CriticalException("invalid option"); + } + AbstractFieldValue voteInfo = new ScalarFieldValue( + new XElement("votes", + from option in options select new XElement("vote", new XAttribute("optionId", option)) + ).ToString() + ); + ChangeSetUtil.ApplyChanges( + new InsertOrUpdateChange( + Vote.TableSpec.instance, + new Dictionary { + { Vote.TableSpec.FIELD_POLLID, new ScalarFieldValue(this.id.ToString()) }, + { Vote.TableSpec.FIELD_USERID, new ScalarFieldValue(user.id.ToString()) }, + { Vote.TableSpec.FIELD_VOTEINFO, voteInfo } + }, + new Dictionary { + { Vote.TableSpec.FIELD_VOTEINFO, voteInfo }, + }, + new ComplexCondition( + ConditionsJoinType.AND, + new ComparisonCondition( + Vote.TableSpec.instance.getColumnSpec(Vote.TableSpec.FIELD_POLLID), + ComparisonType.EQUAL, + this.id.ToString() + ), + new ComparisonCondition( + Vote.TableSpec.instance.getColumnSpec(Vote.TableSpec.FIELD_USERID), + ComparisonType.EQUAL, + user.id.ToString() + ) + ) + ) + ); + } + + public static Poll Create(User poster, bool isDetailed, bool isMultiOption, string titleUbb, List optionsUbb) { + List options = new List(); + for(int i=0; i { + { TableSpec.FIELD_ISDETAILED, new ScalarFieldValue(isDetailed ? "1" : "0") }, + { TableSpec.FIELD_ISMULTIOPTION, new ScalarFieldValue(isMultiOption ? "1" : "0") }, + { TableSpec.FIELD_POSTERID, new ScalarFieldValue(poster.id.ToString()) }, + { TableSpec.FIELD_POSTDATE, new ScalarFieldValue(DateTime.Now.ToUTCString()) }, + { TableSpec.FIELD_TITLE, new ScalarFieldValue(UBBParser.UBBToIntermediate(titleUbb)) }, + { TableSpec.FIELD_OPTIONS, new ScalarFieldValue((new XElement("options", options)).ToString()) }, + } + ); + ChangeSetUtil.ApplyChanges(pollInsert); + return Poll.LoadById(pollInsert.getId().Value); + } + + } +} diff --git a/IISMainHandler/HandlersFactory.cs b/IISMainHandler/HandlersFactory.cs index c0c2d4b..bbbe3f2 100644 --- a/IISMainHandler/HandlersFactory.cs +++ b/IISMainHandler/HandlersFactory.cs @@ -124,6 +124,16 @@ namespace FLocal.IISHandler { default: return new handlers.WrongUrlHandler(); } + case "poll": + if(context.requestParts.Length < 2) { + return new handlers.WrongUrlHandler(); + } + switch(context.requestParts[1].ToLower()) { + case "create": + return new handlers.response.CreatePollHandler(); + default: + return new handlers.response.PollHandler(); + } case "static": return new handlers.StaticHandler(context.requestParts); case "do": @@ -151,6 +161,10 @@ namespace FLocal.IISHandler { return new handlers.request.MarkThreadAsReadHandler(); case "upload": return new handlers.request.UploadHandler(); + case "newpoll": + return new handlers.request.CreatePollHandler(); + case "vote": + return new handlers.request.VoteHandler(); default: return new handlers.WrongUrlHandler(); } diff --git a/IISMainHandler/IISMainHandler.csproj b/IISMainHandler/IISMainHandler.csproj index e0e6c1d..7e4276a 100644 --- a/IISMainHandler/IISMainHandler.csproj +++ b/IISMainHandler/IISMainHandler.csproj @@ -60,6 +60,7 @@ + @@ -71,11 +72,13 @@ + + @@ -85,6 +88,7 @@ + diff --git a/IISMainHandler/handlers/request/CreatePollHandler.cs b/IISMainHandler/handlers/request/CreatePollHandler.cs new file mode 100644 index 0000000..040aeec --- /dev/null +++ b/IISMainHandler/handlers/request/CreatePollHandler.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using FLocal.Core; +using FLocal.Common.dataobjects; + +namespace FLocal.IISHandler.handlers.request { + class CreatePollHandler : AbstractPostHandler { + + protected override string templateName { + get { + return "result/PollCreated.xslt"; + } + } + + protected override XElement[] Do(WebContext context) { + + string title = context.httprequest.Form["title"].Trim(); + if(title == "") throw new FLocalException("title is empty"); + + string[] rawOptions = context.httprequest.Form.GetValues("option"); + List options = new List(); + foreach(string rawOption in rawOptions) { + if(rawOption != null && rawOption.Trim() != "") { + options.Add(rawOption.Trim()); + } + } + if(options.Count < 2) throw new FLocalException("Only " + options.Count + " options is entered"); + + bool isDetailed = context.httprequest.Form.AllKeys.Contains("isDetailed"); + bool isMultiOption = context.httprequest.Form.AllKeys.Contains("isMultiOption"); + + Poll poll = Poll.Create( + context.session.account.user, + isDetailed, + isMultiOption, + title, + options + ); + return new XElement[] { + poll.exportToXml(context), + }; + } + } +} diff --git a/IISMainHandler/handlers/request/VoteHandler.cs b/IISMainHandler/handlers/request/VoteHandler.cs new file mode 100644 index 0000000..49c2e85 --- /dev/null +++ b/IISMainHandler/handlers/request/VoteHandler.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using FLocal.Core; +using FLocal.Common.dataobjects; + +namespace FLocal.IISHandler.handlers.request { + class VoteHandler : AbstractPostHandler { + + protected override string templateName { + get { + return "result/VoteAccepted.xslt"; + } + } + + protected override XElement[] Do(WebContext context) { + + Poll poll = Poll.LoadById(int.Parse(context.httprequest.Form["pollId"])); + + string[] rawOptions = context.httprequest.Form.GetValues("option"); + HashSet options = new HashSet(); + foreach(string rawOption in rawOptions) { + options.Add(int.Parse(rawOption)); + } + + if(!poll.isMultiOption && options.Count > 1) { + throw new FLocalException(options.Count + " options selected in a single-option poll"); + } + + poll.GiveVote(context.session.account.user, options); + + return new XElement[] { + poll.exportToXml(context), + }; + } + } +} diff --git a/IISMainHandler/handlers/response/CreatePollHandler.cs b/IISMainHandler/handlers/response/CreatePollHandler.cs new file mode 100644 index 0000000..192fdb3 --- /dev/null +++ b/IISMainHandler/handlers/response/CreatePollHandler.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Xml.Linq; +using FLocal.Core; +using FLocal.Common; +using FLocal.Common.dataobjects; + +namespace FLocal.IISHandler.handlers.response { + + class CreatePollHandler : AbstractGetHandler { + + override protected string templateName { + get { + return "NewPoll.xslt"; + } + } + + override protected XElement[] getSpecificData(WebContext context) { + return new XElement[] { + }; + } + } + +} \ No newline at end of file diff --git a/IISMainHandler/handlers/response/PollHandler.cs b/IISMainHandler/handlers/response/PollHandler.cs new file mode 100644 index 0000000..c4a15cd --- /dev/null +++ b/IISMainHandler/handlers/response/PollHandler.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Xml.Linq; +using FLocal.Common; +using FLocal.Common.dataobjects; +using FLocal.Core; +using FLocal.Core.DB; +using FLocal.Core.DB.conditions; + +namespace FLocal.IISHandler.handlers.response { + + class PollHandler : AbstractGetHandler { + + override protected string templateName { + get { + return "Poll.xslt"; + } + } + + override protected XElement[] getSpecificData(WebContext context) { + Poll poll = Poll.LoadById(int.Parse(context.requestParts[1])); + return new XElement[] { + poll.exportToXmlWithVotes(context) + }; + } + + } + +} \ No newline at end of file diff --git a/templates/Full/NewPoll.xslt b/templates/Full/NewPoll.xslt new file mode 100644 index 0000000..797506a --- /dev/null +++ b/templates/Full/NewPoll.xslt @@ -0,0 +1,192 @@ + + + + + + Íîâûé îïîðîñ + + + + + + +
+ + + + + + + + + + +
+ Ñîçäàíèå íîâîãî îïðîñà +
+ Çàïîëíèòå ïðèâåäåííóþ íèæå ôîðìó äëÿ îòïðàâêè ñîîáùåíèÿ â ôîðóì. HTML îòêëþ÷åí. UBBCode âêëþ÷åí, è âû ìîæåòå èñïîëüçîâàòü UBBCode â âàøèõ ñîîáùåíèÿõ. Àíîíèìíûå ñîîáùåíèÿ ðàçðåøåíû, è âû ìîæåòå âûáðàòü ëþáîå íåçàðåãèñòðèðîâàííîå èìÿ. +
+
+ Ïîëüçîâàòåëü: + +
+
+ Òåìà: +
+ +
+
+ +
+ +
+
+ Âàðèàíò 1: +
+ +
+
+ Âàðèàíò 2: +
+ +
+
+ Âàðèàíò 3: +
+ +
+
+ Âàðèàíò 4: +
+ +
+
+ Âàðèàíò 5: +
+ +
+
+ Âàðèàíò 6: +
+ +
+
+ Âàðèàíò 7: +
+ +
+
+ Âàðèàíò 8: +
+ +
+
+ Âàðèàíò 9: +
+ +
+
+ Âàðèàíò 10: +
+ +
+
+ Âàðèàíò 11: +
+ +
+
+ Âàðèàíò 12: +
+ +
+
+ Âàðèàíò 13: +
+ +
+
+ Âàðèàíò 14: +
+ +
+
+ Âàðèàíò 15: +
+ +
+
+ Âàðèàíò 16: +
+ +
+
+ Âàðèàíò 17: +
+ +
+
+ Âàðèàíò 18: +
+ +
+
+ Âàðèàíò 19: +
+ +
+
+ Âàðèàíò 20: +
+ +
+
+ + +
+
+
+ +
\ No newline at end of file diff --git a/templates/Full/Poll.xslt b/templates/Full/Poll.xslt new file mode 100644 index 0000000..8714f5c --- /dev/null +++ b/templates/Full/Poll.xslt @@ -0,0 +1,44 @@ + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + Îïðîñû + >> + + +
+
+
+
+ + + + +
+ + +
+
+
+ +
\ No newline at end of file diff --git a/templates/Full/elems/PollInfo.xslt b/templates/Full/elems/PollInfo.xslt new file mode 100644 index 0000000..d5da8d6 --- /dev/null +++ b/templates/Full/elems/PollInfo.xslt @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + + + + + + +
+ +
+ + + +

+

+ + + Äåòàëèçàöèÿ ïî ãîëîñàì â ýòîì îïðîñå îòêðûòà + + + Ýòî àíîíèìíûé îïðîñ + + +

+

+ + + Ýòîò îïðîñ äîïóñêàåò âûáîð íåñêîëüêèõ âàðèàíòîâ îòâåòà + + + Ýòîò îïðîñ äîïóñêàåò âûáîð òîëüêî îäíîãî âàðèàíòà îòâåòà + + +

+

+ Âñåãî ãîëîñîâ: + +

+ + + + + + checkbox + + + radio + + + + + + + +
+ +
+
+
+ Äëÿ âñòàâêè ññûëêè â ôîðóì èñïîëüçóéòå òýã [poll] + + [/poll] +
+
+
+
+
+
+
+ + +
+ + + radio + 0 + + + + + + + checked + + + disabled + + + + + +
+ + height:1em; + width: + + + + % + + + 3px + + + + +
+

+ + ãîëîñîâ ( + + + + + + 0 + + + %) +

+ +

+ +

+
+ + +
+ + + + /User// + + + + +
\ No newline at end of file diff --git a/templates/Full/elems/TextEditor.xslt b/templates/Full/elems/TextEditor.xslt index d3414f1..30c5aee 100644 --- a/templates/Full/elems/TextEditor.xslt +++ b/templates/Full/elems/TextEditor.xslt @@ -124,6 +124,7 @@ function insertInBody(str) { + + + Ñîçäàòü îïðîñ + diff --git a/templates/Full/result/PollCreated.xslt b/templates/Full/result/PollCreated.xslt new file mode 100644 index 0000000..0df196b --- /dev/null +++ b/templates/Full/result/PollCreated.xslt @@ -0,0 +1,35 @@ + + + + Îïðîñ ñîçäàí + + + + + +
+ + + + + + + +
+ Ñîçäàíèå îïðîñà +
+ Îïðîñ óñïåøíî ñîçäàí. +
+ Òåïåðü âû ìîæåòå âñòàâëÿòü ññûëêè íà íåãî ñ ïîìîùüþ òýãà [poll] + + [/poll] +
+ + /Poll// + Ïåðåéòè ê îïðîñó + +
+
+
+ +
\ No newline at end of file diff --git a/templates/Full/result/VoteAccepted.xslt b/templates/Full/result/VoteAccepted.xslt new file mode 100644 index 0000000..a5cf35f --- /dev/null +++ b/templates/Full/result/VoteAccepted.xslt @@ -0,0 +1,31 @@ + + + + Ãîëîñ ïðèíÿò + + + + + +
+ + + + + + + +
+ Ó÷àñòèå â îïðîñå +
+ Âàø ãîëîñ ïðèíÿò. +
+ + /Poll// + Âåðíóòüñÿ ê îïðîñó + +
+
+
+ +
\ No newline at end of file