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`uQ=q`;Q`Vdjq?XJSmI+J%0dk~hlMhYbU sziY4*=DHJnhzzT32{}d|c%_FO+2qEN;b7@#b&DO$3xmU@99Fg1f7)orAOHXW diff --git a/boards/locale/ru/LC_MESSAGES/djangojs.po b/boards/locale/ru/LC_MESSAGES/djangojs.po --- a/boards/locale/ru/LC_MESSAGES/djangojs.po +++ b/boards/locale/ru/LC_MESSAGES/djangojs.po @@ -91,3 +91,7 @@ msgstr "Изменить тему" msgid "Hide/show" msgstr "Скрыть/показать" + +msgid "Rollover thread" +msgstr "Перекатить тред" + diff --git a/boards/locale/uk/LC_MESSAGES/djangojs.mo b/boards/locale/uk/LC_MESSAGES/djangojs.mo index 6af7339f8c6d886e8d1bc760c82eebd3604b3cc9..11a21da7ea372064ae07299bac68e562a68b1edc GIT binary patch literal 1991 zc$}4!PiP!f9LHZ{Qrp#5t$#pNd_h_o>uhF|h;fr`I?ZmI#oc7x{3&{y?!0bBXJ?j~ z*=iw5lOpsG2$UK@57m2)X2za1_v7=xY_$2rY_!xM+BhsZh zBEJ!^6MQ>9p8*ep7r`ee4|oim0~6p<9QX71{C0f45y$-jd>s5S&igyqLQQ{xuVMdf zXVlA2;B(*~;H%)FF2-H~`@tUY0{A>Q555e3(G}(0jP2jYy5C|RJ;>Nea1eX})WIb9 z(ZR_78*qT?14n2+k1{q4YTy|7F&K|DoFDbn5$}(%-G^$RIUsG=|KWd}(fp|Qr{g{K zk96Uj578aO_lQ*C%)>`B3~o6U-Qu2aR^Asb(_F!?I1TPKTrtAV>NdSxw+(IxOZb9~ zI<?fCqX)36Ozb}Y-e3|$;{QrM*A zHQ{*(OCFQLC4q2V$L(e&WsANZi&brUtmHcHiHfh}4P{2Sp6S?WUeZS2($44jOs+hc zpBPV+Mcr|IrRY^nLpj^1ddifO=84k8lroAMd^jmt^q%H@YU*`GeN#~fcxo^`@Wv^% zUsWMg%Hp!=?dsmiX=SB2p=32aHjysoPrW-ao=X&T&sU~g-S#Zqcic2TH(e<3ajlr+ z!?~iCFPzb`*>Y}j@-(D&wSfkdDWTWWyr7MrpQe(B3xzY5nRMLht_GzR^Tph5f2pLJ z7=aj)+9hG%SxJu5hI5hAyAG~P#iIUZD zbxS$txHT`$?RvQNGW|n5T4qk#$5U!1lj0{%a9XO}nN*68aFwUS{pn0!`)D{bK+DiW z9ZsoyZZ2|xM(u%53O;>3LkT8t%5AwSSAqq(&gCXH_vDJ)3>M{m=6|$Wf)t* zRVKeCQIkFoWDAR}V0nbe&){(<@(r%R8V1|P%n_3!P)?k!N764LS_`g1@(EVW;977K zX%~@vsr`?UH}*PF2_#*Haa-PpxrLIqf~8Q2SUU-~LI>2qdK$$*sa=fvS3d1Z(tL3a-mmH~aT= TqD%cR#$b`{|Eu^v2MF{xPYNJC diff --git a/boards/locale/uk/LC_MESSAGES/djangojs.po b/boards/locale/uk/LC_MESSAGES/djangojs.po --- a/boards/locale/uk/LC_MESSAGES/djangojs.po +++ b/boards/locale/uk/LC_MESSAGES/djangojs.po @@ -91,3 +91,7 @@ msgstr "Змінити нитку" msgid "Hide/show" msgstr "Приховати/відобразити" + +msgid "Rollover thread" +msgstr "Перекотити нитку" + diff --git a/boards/static/js/main.js b/boards/static/js/main.js --- a/boards/static/js/main.js +++ b/boards/static/js/main.js @@ -328,6 +328,15 @@ function addContextMenu() { } }, visible: hasIp && canDeletePost + }, + rollover: { + name: gettext('Rollover thread'), + callback: function(key, opt) { + if (confirm(gettext('Are you sure?'))) { + window.location = '/all/?t_from_id=' + postId + '#form'; + } + }, + visible: isOpening } } }; diff --git a/boards/views/all_threads.py b/boards/views/all_threads.py --- a/boards/views/all_threads.py +++ b/boards/views/all_threads.py @@ -57,9 +57,24 @@ class AllThreadsView(BaseBoardView, Pagi SETTING_SUBSCRIBE_BY_DEFAULT, False) if not form: - form = ThreadForm(error_class=PlainErrorList, - initial={FORM_TAGS: self.tag_name, - 'subscribe': subscribe_by_default}) + t_from_id = request.GET.get('t_from_id') + if t_from_id: + source_op = Post.objects.get(id=int(t_from_id)) + tags_str = ' '.join([tag.get_name() for tag in source_op.get_thread().get_tags()]) + post_link = '[post]{}[/post]'.format(source_op.id) #FIXME To constants + new_title = source_op.get_title() + ' NEW' # TODO More intelligent name change + + form = ThreadForm(error_class=PlainErrorList, + initial={ + FORM_TAGS: tags_str, + 'subscribe': subscribe_by_default, + FORM_TEXT: post_link, + FORM_TITLE: new_title, + }) + else: + form = ThreadForm(error_class=PlainErrorList, + initial={FORM_TAGS: self.tag_name, + 'subscribe': subscribe_by_default}) self.settings_manager = get_settings_manager(request)