diff --git a/res/menu_icons.png b/res/menu_icons.png index 6faf986..b798a89 100755 Binary files a/res/menu_icons.png and b/res/menu_icons.png differ diff --git a/res/note.png b/res/note.png new file mode 100644 index 0000000..c9e3efd Binary files /dev/null and b/res/note.png differ diff --git a/res/ovk_attach.png b/res/ovk_attach.png index a2e19dd..7b12f7e 100755 Binary files a/res/ovk_attach.png and b/res/ovk_attach.png differ diff --git a/res/podrobnee.js b/res/podrobnee.js index 6a64686..2587f0c 100755 --- a/res/podrobnee.js +++ b/res/podrobnee.js @@ -1,13 +1,18 @@ -let p_bt = document.querySelector('.podrobnee'); -let p_content = document.querySelector('.podrobnee_content'); +let p_bt = null +let p_content = null +if(document.querySelector('.podrobnee') != null) { -p_bt.addEventListener('click', function(){ - let text = ["Показать подробнее", "Скрыть"]; - p_bt.innerText = text[Number(p_bt.innerText === text[0])] - p_content.classList.toggle('active'); -}); + p_bt = document.querySelector('.podrobnee'); + p_content = document.querySelector('.podrobnee_content'); -u(".post-like-button").on("click", function(e) { + p_bt.addEventListener('click', function(){ + let text = ["Показать подробнее", "Скрыть"]; + p_bt.innerText = text[Number(p_bt.innerText === text[0])] + p_content.classList.toggle('active'); + }); +} + +/*u(".post-like-button").on("click", function(e) { e.preventDefault(); var thisBtn = u(this).first(); @@ -25,4 +30,61 @@ u(".post-like-button").on("click", function(e) { } return false; -}); +});*/ + +function mobileRepost(postId) { + let el = document.getElementById("post"+postId+"_actions") + let hash = document.querySelector("meta[name=csrf]").getAttribute("value"); + + if(document.querySelector("#post"+postId+"_actions #mobile_repost"+postId) == null) { + el.insertAdjacentHTML("beforeend", ` +
+ ${tr('your_comment')}: +
+ + +
+ `) + + repSubmit.onclick = () => { + text = document.querySelector("#uRepostMsgInput_"+postId).value; + type = "wall"; + + let xhr = new XMLHttpRequest() + xhr.open("POST", "/wall"+postId+"/repost?hash="+encodeURIComponent(hash), true); + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr.onload = (function() { + if(xhr.responseText.indexOf("wall_owner") === -1) { + el.innerHTML = "can't repost" + } else { + let jsonR = JSON.parse(xhr.responseText); + location.href = "/wall" + jsonR.wall_owner + } + }); + + xhr.send('text='+encodeURI(text) + '&type='+type); + } + } else { + document.getElementById("post"+postId+"_actions").innerHTML = "" + } +} + +if(document.querySelector("#_noteDelete") != null) { + document.querySelector("#_noteDelete").addEventListener("click", (e) => { + let link = e.currentTarget.href + let hash = document.querySelector("meta[name=csrf]").getAttribute("value") + let id = e.currentTarget.dataset.id + + let xhr = new XMLHttpRequest() + xhr.open("POST", link) + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + + xhr.onload = () => { + location.href = "/notes"+id + } + + xhr.send('hash='+encodeURIComponent(hash)); + + e.preventDefault() + }) +} \ No newline at end of file diff --git a/res/youtube_video.png b/res/youtube_video.png new file mode 100644 index 0000000..e080d89 Binary files /dev/null and b/res/youtube_video.png differ diff --git a/stylesheet.css b/stylesheet.css index 1cd6edf..36fb5bb 100755 --- a/stylesheet.css +++ b/stylesheet.css @@ -50,7 +50,7 @@ input, button { -webkit-appearance: button;} background-color: #f7f7f7; margin: 0 auto; font-family: tahoma, verdana, arial, sans-serif; - max-width: 580px; + max-width: 580px; } .app_layer{ @@ -137,7 +137,7 @@ input, button { -webkit-appearance: button;} margin: 0.5em -12px; } -.button, .fileInput, input[type=submit], input[type=reset] { +.button, .fileInput, input[type=submit], input[type=button], input[type=reset] { display: inline-block; border: none; border-radius: 3px; @@ -357,15 +357,15 @@ input, button { -webkit-appearance: button;} outline: none; cursor: pointer; vertical-align: middle; - margin-top: 0%; + margin-top: 0%; } .formInput > input[type=checkbox]{ - background-image: url("data:image/gif;base64,R0lGODlhDwA4ALMAAP//////AP8A//8AAAD//wD/AAAA/wAAADtZd8XKzuHh4crKysHBwba2tv///wAAACH5BAEAAA4ALAAAAAAPADgAAASzcMlJqVsg653X5SDgYeE2luaHdup6rmKLvq5c0rMdjlUvXb6eDoRAkFBF4yqZOBKLi2aJSUNomE1VEoCNkRLJYiLB+oLF5LJmjBinnOO0BncDBi2NvH6/dzQUgIGCgA1+g4cKhX+IgoqMjYaPhJGSjpKJlI+WlZmMm5qdiIp8pHl+paShh0WLj0mtiEywg0kMCbOBTAyUCLlolkkKWJiLZ8PEgGxogZtsY5CwcYOfnqeofREAOw=="); + background-image: url("data:image/gif;base64,R0lGODlhDwA4ALMAAP//////AP8A//8AAAD//wD/AAAA/wAAADtZd8XKzuHh4crKysHBwba2tv///wAAACH5BAEAAA4ALAAAAAAPADgAAASzcMlJqVsg653X5SDgYeE2luaHdup6rmKLvq5c0rMdjlUvXb6eDoRAkFBF4yqZOBKLi2aJSUNomE1VEoCNkRLJYiLB+oLF5LJmjBinnOO0BncDBi2NvH6/dzQUgIGCgA1+g4cKhX+IgoqMjYaPhJGSjpKJlI+WlZmMm5qdiIp8pHl+paShh0WLj0mtiEywg0kMCbOBTAyUCLlolkkKWJiLZ8PEgGxogZtsY5CwcYOfnqeofREAOw=="); } .formInput > input[type=radio]{ - background-image: url("/themepack/mobile_ovk/0.0.1.0/resource/radio.png"); + background-image: url("/themepack/mobile_ovk/0.0.1.0/resource/radio.png"); } .formInput > input[type=checkbox]:hover, .formInput > input[type=radio]:hover { @@ -443,6 +443,12 @@ input, button { -webkit-appearance: button;} color: #9a6d6d; } +.alert.yellow { + border-color:#D4BC4C; + background-color:#F9F6E7; +} + + .alert.inline { background-color: #fff; text-align: center; @@ -451,8 +457,8 @@ input, button { -webkit-appearance: button;} .tabs { margin-top: 11px; padding-bottom: 11px; - overflow-x: scroll; - white-space: nowrap; + overflow-x: scroll; + white-space: nowrap; } .tabs > .selector > .tab-select { @@ -758,24 +764,24 @@ img.rounded, .post > .author > .ava { /* папапепе гемабоди) */ .navigation { - pointer-events:none !important; - position: fixed; - width: 866px; - } - .app, - h2 { - min-width:864px; - max-width:45%; - border-right:none; - border-bottom:0px solid #dee5eb - } - .menuovk { - background:#fff; - width:288px !important; - display:block !important; - top: 48px; - position: absolute; - } + pointer-events:none !important; + position: fixed; + width: 866px; + } + .app, + h2 { + min-width:864px; + max-width:45%; + border-right:none; + border-bottom:0px solid #dee5eb + } + .menuovk { + background:#fff; + width:288px !important; + display:block !important; + top: 48px; + position: absolute; + } .profile_menu_arrow{ position: inherit; @@ -792,7 +798,7 @@ img.rounded, .post > .author > .ava { z-index:1337; right: 0; top: 0; - pointer-events: all !important; + pointer-events: all !important; } .head_now{ @@ -862,9 +868,9 @@ img.rounded, .post > .author > .ava { .menunameava .pr_ovk_page .status { color: #797979; font-size: 14px; - overflow: hidden; - max-width:200px; - text-overflow: ellipsis; + overflow: hidden; + max-width:200px; + text-overflow: ellipsis; } /* Подписывайтесь на мой YouTube: youtube.com/DanielM */ @@ -1047,7 +1053,7 @@ img.rounded, .post > .author > .ava { .content_post { padding: 12px; padding-top: 2px; - background: #fff; + background: #fff; } .post { margin-top: 10px; @@ -1119,19 +1125,19 @@ img.rounded, .post > .author > .ava { margin-top: 19px; font-weight: bold; margin-left: 5px; - text-overflow:ellipsis; - white-space:nowrap; - overflow:hidden; - max-width: 55%; + text-overflow:ellipsis; + white-space:nowrap; + overflow:hidden; + max-width: 55%; } .video_desc{ - text-overflow:ellipsis; - white-space:nowrap; - overflow:hidden; - max-width: 55%; - display: block; - max-height: 75px; + text-overflow:ellipsis; + white-space:nowrap; + overflow:hidden; + max-width: 55%; + display: block; + max-height: 75px; } .profile_link_form { @@ -1506,6 +1512,10 @@ h4 { background-position: 0px -332px; } +#notfg{ + background-position: 0px -392px; +} + .element.prmenu.gray a { font-size: 16px; font-weight: normal; @@ -1735,7 +1745,7 @@ input[type~="search"]{ background: #fff; } -.attach_menu_ph{ +.attach_menu_ph { text-align:left; background-color: transparent; display: block; @@ -1750,6 +1760,19 @@ input[type~="search"]{ padding: 0px; } +.attach_menu_video { + background-color: transparent; + display: block; + float: right; + position: inherit; + background-image: url('/themepack/mobile_ovk/0.0.1.0/resource/ovk_attach.png'); + width: 32px; + height: 32px; + background-position: -350px 50%; + background-repeat: no-repeat; + margin: -12px 0px 0px 0px; + padding: 0px; +} .avatar-list-item { padding: 4px 0; @@ -1864,7 +1887,7 @@ input[type~="search"]{ font-weight: bold; border: 1px solid #d7cf9e; border-bottom: 0; - font-size: 14px; + font-size: 14px; } #faqcontent { @@ -1872,19 +1895,19 @@ input[type~="search"]{ margin: 0 5px 10px; padding: 5px 5px 5px 10px; border: 1px solid #ddd; - font-size: 12px; + font-size: 12px; } .s_text{ - font-size: 14px; - margin: 3px; + font-size: 14px; + margin: 3px; } .s_post-author{ - font-size: 14px; + font-size: 14px; } .knowledgeBaseArticle{ - padding: 5px; + padding: 5px; } .alert.fake { @@ -1902,7 +1925,7 @@ input[type~="search"]{ padding: 8px; transition: .1s filter ease-in; border: 1px solid #e3e3e3; - margin-bottom: 10px; + margin-bottom: 10px; } .poll-embed { @@ -1916,8 +1939,8 @@ input[type~="search"]{ .poll-meta .nobold { font-style: oblique; - font-size: 12px; - color: gray; + font-size: 12px; + color: gray; } .poll-result-barspace { @@ -1967,7 +1990,7 @@ a.poll-retract-vote { } label, .poll > input[type=checkbox]{ - background-color: transparent; + background-color: transparent; border: none; border-radius: 0; -moz-appearance: none; @@ -1977,11 +2000,11 @@ label, .poll > input[type=checkbox]{ outline: none; cursor: pointer; vertical-align: middle; - margin-top: 0%; + margin-top: 0%; } .poll-option{ - padding: 5px; + padding: 5px; } .completeness-gauge { @@ -2018,6 +2041,19 @@ label, .poll > input[type=checkbox]{ margin-left: 5px; } +.youtube_video_block { + margin-bottom: 10px; + position: relative; +} + +.youtube_button { + z-index: 555; + position: absolute; + margin: auto; + position: absolute; + top: 0; left: 0; bottom: 0; right: 0; +} + /* IE 10+ styles only for necrobrowsers */ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .navigation { @@ -2048,3 +2084,42 @@ label, .poll > input[type=checkbox]{ margin-top: 45px; } } + +.note_attachment { + background-color: #E6E6E6; + margin-bottom: 5px; + padding-top: 5px; + padding-bottom: 5px; + display: flex; +} + +.note_icon { + max-width: 30px; + margin-left: 10px; +} + +.note_name { + margin-left: 5px; + color: #636466; + font-family: tahoma, verdana, arial, sans-serif; +} + +.note_attachment:hover { + background-color: #ecebeb; +} + +.note_attachment:active { + background-color: #cecece; +} + +.mobile_repost { + background:#E6E6E6; + color: #636466; + font-size: 18px; + width: 300px; + padding: 5px; +} + +.note_title a { + font-size: 20px; +} \ No newline at end of file diff --git a/tpl/@layout.xml b/tpl/@layout.xml index 4282aff..046b5a3 100755 --- a/tpl/@layout.xml +++ b/tpl/@layout.xml @@ -14,6 +14,9 @@ + + {script "js/l10n.js"} + {ifset headIncludes}{include headIncludes}{/ifset} @@ -85,6 +88,9 @@
  • {_mobile_videos}
  • +
  • +
    {_mobile_notes}
    +
  • diff --git a/tpl/Group/Edit.xml b/tpl/Group/Edit.xml new file mode 100644 index 0000000..6944a43 --- /dev/null +++ b/tpl/Group/Edit.xml @@ -0,0 +1,87 @@ +{extends "../@layout.xml"} +{block title}{_edit_group}{/block} + +{block titleHeader} + {$club->getName()} » {_edit_group} +{/block} + +{block body} +
    +
    + + {_main} + +
    +
    + + {_backdrop_short} + +
    +
    + + {_followers} + +
    +
    + +
    +

    {_main_information}

    +
    + +
    + {_name}: + +
    +
    + {_description}: + +
    +
    + {_page_address}: + +
    +
    + {_website}: + +
    +
    + {_avatar}: + +
    +
    +
    + {_wall}:
    +
    {_group_allow_post_for_everyone}
    +
    {_group_hide_from_global_feed}
    +
    +
    + {_discussions}:
    +
    {_everyone_can_create_topics}
    +
    {_display_list_of_topics_above_wall}
    +
    +
    + {_group_administrators_list}:
    + {var $areAllAdminsHidden = $club->getManagersCount(true) == 0} +
    {_group_display_only_creator}
    +
    {_group_display_all_administrators}
    +
    {_group_dont_display_administrators_list}

    +
    + + + + + + + + + + + + +
    +
    +{/block} diff --git a/tpl/Group/EditBackdrop.xml b/tpl/Group/EditBackdrop.xml new file mode 100644 index 0000000..52de044 --- /dev/null +++ b/tpl/Group/EditBackdrop.xml @@ -0,0 +1,32 @@ +{extends "../@layout.xml"} +{var $backdrops = $club->getBackDropPictureURLs()} + +{block title}{$club->getName()} | {_backdrop}{/block} + +{block titleHeader} +{$club->getName()} » {_backdrop} +{/block} + +{block body} +
    +
    + + {_main} + +
    +
    + + {_backdrop_short} + +
    +
    + + {_followers} + +
    +
    + +
    + can't +
    +{/block} diff --git a/tpl/Group/Followers.xml b/tpl/Group/Followers.xml new file mode 100644 index 0000000..7032576 --- /dev/null +++ b/tpl/Group/Followers.xml @@ -0,0 +1,53 @@ +{extends "../@listView.xml"} +{var $Manager = openvk\Web\Models\Entities\Manager::class} +{var $iterator = $onlyShowManagers ? $managers : $followers} +{var $count = $paginatorConf->count} +{var $page = $paginatorConf->page} +{var $perPage = 6} + +{block title}{_followers} {$club->getCanonicalName()}{/block} + +{block titleHeader} + {$club->getCanonicalName()} + » {_followers} + {_all_followers} + {_only_administrators} +{/block} + +{* BEGIN ELEMENTS DESCRIPTION *} + +{block tabs} + {if $club->canBeModifiedBy($thisUser)} +
    + + {_main} + +
    +
    + + {_backdrop_short} + +
    +
    + + {_followers} + +
    + {/if} +{/block} + +{block link|strip|stripHtml} + /id{$x instanceof $Manager ? $x->getUserId() : $x->getId()} +{/block} + +{block preview} + {$x instanceof $Manager ? $x->getUser()->getCanonicalName() : $x->getCanonicalName()} +{/block} + +{block name} + {$x instanceof $Manager ? $x->getUser()->getCanonicalName() : $x->getCanonicalName()} +{/block} + +{block description} + +{/block} \ No newline at end of file diff --git a/tpl/Group/View.xml b/tpl/Group/View.xml index 5541f92..8449572 100755 --- a/tpl/Group/View.xml +++ b/tpl/Group/View.xml @@ -56,6 +56,10 @@ + {if isset($thisUser) && $club->canBeModifiedBy($thisUser)} + + {/if} + {ifset $thisUser} {if $club->getSubscriptionStatus($thisUser) == false}
    @@ -101,19 +105,19 @@ -->
    -
    +
    {_information}
    -
    +
    - - + + - - + +
    Описаниe:
    {_description}: {$club->getDescription()}
    Сайт:
    {_website}: {$club->getWebsite()} @@ -132,16 +136,21 @@ {presenter "openvk!Wall->wallEmbedded", -$club->getId()} - + {/block} diff --git a/tpl/Notes/Create.xml b/tpl/Notes/Create.xml new file mode 100644 index 0000000..3e0b78c --- /dev/null +++ b/tpl/Notes/Create.xml @@ -0,0 +1,58 @@ +{extends "../@layout.xml"} + +{block title}{_create_note}{/block} + +{block titleHeader} + {_create_note} +{/block} + +{block body} + + +

    + +
    + +

    Кое-что из (X)HTML поддерживается.

    + + + + {_note_preview} + + + {script "js/node_modules/monaco-editor/min/vs/loader.js"} + {script "js/node_modules/requirejs/bin/r.js"} + +{/block} diff --git a/tpl/Notes/Edit.xml b/tpl/Notes/Edit.xml new file mode 100644 index 0000000..7e66ae7 --- /dev/null +++ b/tpl/Notes/Edit.xml @@ -0,0 +1,48 @@ +{extends "../@layout.xml"} + +{block title}{_edit_note}{/block} + +{block titleHeader} + {var $author = $note->getOwner()} + {$author->getCanonicalName()} + » + {_notes} + » + {$note->getName()} +{/block} + +{block body} +
    + +

    + +
    + +

    Кое-что из (X)HTML поддерживается.

    + + + + +
    + + {script "js/node_modules/monaco-editor/min/vs/loader.js"} + {script "js/node_modules/requirejs/bin/r.js"} + +{/block} diff --git a/tpl/Notes/List.xml b/tpl/Notes/List.xml new file mode 100644 index 0000000..1e18367 --- /dev/null +++ b/tpl/Notes/List.xml @@ -0,0 +1,69 @@ +{extends "../@layout.xml"} +{var $iterator = iterator_to_array($notes)} +{var $page = $paginatorConf->page} + +{block title}{_notes}{/block} + +{block titleHeader} + {if isset($thisUser) && $thisUser->getId() == $owner->getId()} + {_my_notes} + {else} + + {$owner->getCanonicalName()} + » + {_notes} + {/if} +{/block} + +{block actions} + +{/block} + +{* BEGIN ELEMENTS DESCRIPTION *} + +{block body} + +
    +
    +
    + + + + + + +
    +
    + {var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} + {if sizeof($data) > 0} + +
    + +
    + + {else} + {if isset($thisUser) && $thisUser->getId() == $owner->getId()} + +

    {_welcome}

    {_notes_start_screen}
    + + {else} + {ifset customErrorMessage} + {include ../customErrorMessage} + {else} + {include ../components/nothing.xml} + {/ifset} + {/if} + {/if} +
    +{/block} \ No newline at end of file diff --git a/tpl/Notes/PreView.xml b/tpl/Notes/PreView.xml new file mode 100644 index 0000000..4f80214 --- /dev/null +++ b/tpl/Notes/PreView.xml @@ -0,0 +1,37 @@ +{extends "../@layout.xml"} + +{block title} + {$title} +{/block} + +{block header} + {$title} +{/block} + +{block content} + + + {$html|noescape} +{/block} diff --git a/tpl/Notes/View.xml b/tpl/Notes/View.xml new file mode 100644 index 0000000..5bba736 --- /dev/null +++ b/tpl/Notes/View.xml @@ -0,0 +1,79 @@ +{extends "../@layout.xml"} + +{block title}{$note->getName()}{/block} + +{block titleHeader} + {var $author = $note->getOwner()} + {$author->getCanonicalName()} + » + {_notes} + » + {$note->getName()} +{/block} + +{block body} + {var $author = $note->getOwner()} + + + + + +
    + {include "../components/comments.xml", + comments => $comments, + count => $cCount, + page => $cPage, + model => "notes", + parent => $note, + showTitle => false} +
    +{/block} \ No newline at end of file diff --git a/tpl/Search/Index.xml b/tpl/Search/Index.xml index d6e31e8..a1d4516 100755 --- a/tpl/Search/Index.xml +++ b/tpl/Search/Index.xml @@ -1,4 +1,4 @@ -{extends "../@listView.xml"} +{extends "../@layout.xml"} {block title} {if $type === "users"} @@ -8,8 +8,8 @@ {/if} {/block} -{block header} - +{block titleHeader} + {_header_search} {/block} @@ -19,18 +19,35 @@ {block tabs} - -
    - - {_groups} - + -
    +
    @@ -39,6 +56,84 @@
    {/block} +{block body} + {include tabs} +

    + {tr("results", $count)} +

    +
    + + {var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} +
    + {if sizeof($data) > 0} + {if $type == "users" || $type == "groups" || $type == "apps"} +
    + + + + + + + + +
    + + {include preview, x => $dat} + + + {ifset infotable} + {include infotable, x => $dat} + {else} + + + {include name, x => $dat} + + +
    + {include description, x => $dat} + {/ifset} +
    +
    + {elseif $type == "posts"} +
    + {if $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()} + brbrevht + {else} + {include "../components/post.xml", post => $dat, commentSection => true, onWallOf => true} + {/if} +
    + {elseif $type == "comments"} +
    + {include "../components/comment.xml", comment => $dat, linkW => true} +
    + {elseif $type == "videos"} + {foreach $data as $dat} +
    + {include "../components/video.xml", video => $dat} +
    + {/foreach} + {elseif $type == "audios"} + privet + {/if} + {include "../components/paginator.xml", conf => (object) [ + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => false, + ]} + {else} + {ifset customErrorMessage} + {include customErrorMessage} + {else} + {include "../components/nothing.xml"} + {/ifset} + {/if} +
    +{/block} + {block link|strip|stripHtml} {$x->getURL()} {/block} diff --git a/tpl/Topics/Board.xml b/tpl/Topics/Board.xml new file mode 100644 index 0000000..26870c5 --- /dev/null +++ b/tpl/Topics/Board.xml @@ -0,0 +1,56 @@ +{extends "../@listView.xml"} +{var $iterator = iterator_to_array($topics)} +{var $page = $paginatorConf->page} + +{block title}{_discussions} {$club->getCanonicalName()}{/block} + +{block titleHeader} + {$club->getCanonicalName()} » {_discussions} + + +{/block} + +{block tabs} +

    + {tr("results", $count)} +

    +{/block} + +{block actions} + +{/block} + +{* BEGIN ELEMENTS DESCRIPTION *} + +{block link|strip|stripHtml} + /topic{$x->getPrettyId()} +{/block} + +{block preview} + +{/block} + +{block name} + {$x->getTitle()} +
    +{/block} + +{block description} +
    + {tr("messages", $x->getCommentsCount())} +
    + {var $lastComment = $x->getLastComment()} +
    +
    + + + +
    +
    + {$lastComment->getOwner()->getCanonicalName()} +
    {_replied} {$lastComment->getPublicationTime()}
    +
    +
    +{/block} diff --git a/tpl/Topics/Create.xml b/tpl/Topics/Create.xml new file mode 100644 index 0000000..84b17f2 --- /dev/null +++ b/tpl/Topics/Create.xml @@ -0,0 +1,73 @@ +{extends "../@layout.xml"} +{block title}{_new_topic}{/block} + +{block titleHeader} + {$club->getCanonicalName()} + » + {_discussions} + » + {_new_topic} +{/block} + +{block body} + + + + + + + + + + + + + + + + +
    + {_title} + + +
    + {_text} + + +
    + +
    +
    + + +
    +
    +
    + + + + +
    + + + + + + + {if $graffiti} + {script "js/node_modules/react/dist/react-with-addons.min.js"} + {script "js/node_modules/react-dom/dist/react-dom.min.js"} + {script "js/vnd_literallycanvas.js"} + {css "js/node_modules/literallycanvas/lib/css/literallycanvas.css"} + {/if} +{/block} diff --git a/tpl/Topics/Edit.xml b/tpl/Topics/Edit.xml new file mode 100644 index 0000000..3036d5a --- /dev/null +++ b/tpl/Topics/Edit.xml @@ -0,0 +1,55 @@ +{extends "../@layout.xml"} +{block title}{_edit_topic} "{$topic->getTitle()}"{/block} + +{block titleHeader} + {$club->getCanonicalName()} + » + {_discussions} + » + {_edit_topic} +{/block} + +{block body} +
    + {$topic->getTitle()} +
    + {$topic->getOwner()->getCanonicalName()} +
    + +
    + + + + + + + + + + + + + + + +
    + {_title} + + +
    + {_topic_settings} + + {if $topic->getClub()->canBeModifiedBy($thisUser)} + {_pin_topic}
    + {/if} + {_close_topic} +
    + {_delete_topic} + + + +
    + + +
    +{/block} diff --git a/tpl/Topics/Topic.xml b/tpl/Topics/Topic.xml new file mode 100644 index 0000000..e83e239 --- /dev/null +++ b/tpl/Topics/Topic.xml @@ -0,0 +1,29 @@ +{extends "../@layout.xml"} +{block title}{_view_topic} "{$topic->getTitle()}"{/block} + +{block titleHeader} + {$club->getCanonicalName()} + » + {_discussions} + » + {_view_topic} + + +{/block} + +{block body} +
    + {$topic->getTitle()} +
    + {$topic->getOwner()->getCanonicalName()} +
    + {_created} {$topic->getPublicationTime()} +
    +
    +
    +

    {tr("topic_messages_count", $count)}

    + {include "../components/comments.xml", comments => $comments, count => $count, page => $page, model => "topics", club => $club, readOnly => $topic->isClosed(), showTitle => false, parent => $topic} +
    +{/block} diff --git a/tpl/User/View.xml b/tpl/User/View.xml index 3cdd812..7043136 100755 --- a/tpl/User/View.xml +++ b/tpl/User/View.xml @@ -48,13 +48,6 @@ {block body} {if !$user->isBanned()} - {if !$user->getPrivacyPermission('page.read', $thisUser ?? NULL)} -
    - {_forbidden}
    - {_forbidden_comment} -
    - {else} -
    {strpos($alert, "@") === 0 ? tr(substr($alert, 1)) : $alert}
    @@ -394,8 +387,6 @@ {presenter "openvk!Wall->wallEmbedded", $user->getId()}
    - {/if} - {else} {* isBanned() *} {include "banned.xml"} {/if} diff --git a/tpl/components/attachment.xml b/tpl/components/attachment.xml index cbf2c33..365530f 100755 --- a/tpl/components/attachment.xml +++ b/tpl/components/attachment.xml @@ -10,7 +10,17 @@ {/if} {elseif $attachment instanceof \openvk\Web\Models\Entities\Video} - + {if $attachment->getType() === 0} + + {else} + {* Не будем загружать страницу плеером ютуба *} + +
    + + +
    +
    + {/if} {elseif $attachment instanceof \openvk\Web\Models\Entities\Post} {php $GLOBALS["_nesAttGloCou"] = (isset($GLOBALS["_nesAttGloCou"]) ? $GLOBALS["_nesAttGloCou"] : 0) + 1} {if $GLOBALS["_nesAttGloCou"] > 2} @@ -18,6 +28,13 @@ {else} {include "post.xml", post => $attachment, compact => true} {/if} +{elseif $attachment instanceof \openvk\Web\Models\Entities\Note} + +
    + + {_note} "{$attachment->getName()}" +
    +
    {elseif $attachment instanceof \openvk\Web\Models\Entities\Poll} {presenter "openvk!Poll->view", $attachment->getId()} {else} diff --git a/tpl/components/comment.xml b/tpl/components/comment.xml index 7f4ba55..9974d07 100755 --- a/tpl/components/comment.xml +++ b/tpl/components/comment.xml @@ -52,7 +52,7 @@
    {$author->getCanonicalName()}
    - +
    {$comment->getText()|noescape} diff --git a/tpl/components/post.xml b/tpl/components/post.xml index c2bb3f6..6e20bd6 100755 --- a/tpl/components/post.xml +++ b/tpl/components/post.xml @@ -1,73 +1,70 @@ {var author = $post->getOwner()} -
    -
    - -
    - {$author->getCanonicalName()}
    - -
    -
    - -
    -

    {$post->getText()|noescape}

    -
    +
    +
    + +
    + {$author->getCanonicalName()}
    + +
    +
    + +
    +

    {$post->getText()|noescape}

    +
    -
    -
    -
    - {include "attachment.xml", attachment => $attachment} -
    -
    -
    +
    +
    +
    + {include "attachment.xml", attachment => $attachment} +
    +
    +
    -
    - - - -
    +
    + + - {if !($forceNoCommentsLink ?? false)} - - {if $post->getCommentsCount() > 0} - {$post->getCommentsCount()} - {else} - 0 - {/if} - - {/if} - - {if !($forceNoShareLink ?? false)} - - {/if} +
    -
    + {if !($forceNoCommentsLink ?? false)} + + {if $post->getCommentsCount() > 0} + {$post->getCommentsCount()} + {else} + 0 + {/if} + + {/if} + {if true} + - {if (isset($thisUser))} -
    +
    - {if !($forceNoLike ?? false)} - {var liked = $post->hasLikeFrom($thisUser)} - - - - {/if} +
    + {/if} -
    - {/if} +
    + {if (isset($thisUser))} +
    + {if !($forceNoLike ?? false)} + {var liked = $post->hasLikeFrom($thisUser)} + + -
    + + {/if} + +
    + {/if} +
    +
    diff --git a/tpl/components/textArea.xml b/tpl/components/textArea.xml index 37fce0c..a555199 100755 --- a/tpl/components/textArea.xml +++ b/tpl/components/textArea.xml @@ -5,14 +5,21 @@
    - +
    + + +
    +
    -
    -
    +
    + + +
    +
    diff --git a/tpl/components/video.xml b/tpl/components/video.xml new file mode 100644 index 0000000..752191a --- /dev/null +++ b/tpl/components/video.xml @@ -0,0 +1,35 @@ + + + + + + + +
    +
    + + + +
    +
    + {ifset infotable} + {include infotable, x => $dat} + {else} + + + {$video->getName()} + + +
    +

    + {$video->getDescription() ?? ""} +

    + {_video_uploaded} {$video->getPublicationTime()}
    + +

    + {_view_video} + {if $video->getCommentsCount() > 0}| {_comments} ({$video->getCommentsCount()}){/if} +

    + {/ifset} +
    \ No newline at end of file