Skip to content

Commit

Permalink
something
Browse files Browse the repository at this point in the history
  • Loading branch information
mrilyew committed Aug 16, 2023
1 parent 1347bb2 commit 5019cfb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 205 deletions.
33 changes: 0 additions & 33 deletions tpl/Group/Edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,39 +71,6 @@
<br /><input type="radio" name="administrators_list_display" value="2" n:attr="checked => $club->getAdministratorsListDisplay() == 2" /> {_group_dont_display_administrators_list}<br><br />
</div>

<div n:if="method_exists($club, 'isDeleted') && $club->getOwner()->getId() == $thisUser->getId()">
<script>
function showGroupDeleteDialog()
{
let id = {$club->getId()}
let hash = document.querySelector("meta[name=csrf]").getAttribute("value");

if(document.getElementById("deldiag").innerHTML == "") {
let body = `
<form action="/club` + id + `/delete" id="grpDeactivation" method="POST" style="background:#e3e3e3;padding: 10px;">` +
tr("trying_delete_group") + `
<input type="password" id="password" name="password" required />
<input type="hidden" name="hash" value="` + hash + `" />
<input type="submit" value="`+ tr("ok") +`">
</form>
`

document.getElementById("deldiag").insertAdjacentHTML("afterbegin", body)
} else {
document.getElementById("deldiag").innerHTML = ""
}
}
</script>
<td width="120" valign="top">

</td>
<td>
<span><a href="javascript:showGroupDeleteDialog()">{_delete_group}</a></span>

<div id="deldiag"></div>
</td>
</div>

<tr>
<td>

Expand Down
44 changes: 0 additions & 44 deletions tpl/Group/View.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,49 +44,6 @@
{/block}

{block body}
{if method_exists($club, "isDeleted") && $club->isDeleted()}
<div id="profile_basicInfo" class="contentWrap">
<div class="content">
<div class="pure-g" style="padding-bottom: 12px;">
<div id="profile_basicInfo__avatar">
<img src="{$club->getAvatarUrl()}"/>
</div>

<div id="profile_basicInfo__info" class="pure-u-3-4">
<h2 class="no-margin text_profile_center groups_name">{$club->getName()}<img n:if="$club->isVerified()" class="name-checkmark" src="/themepack/mobile_ovk/0.0.1.0/resource/verify_badge.png"></h2>
</div>
</div>

{ifset $thisUser}
{if method_exists($club, "isDeleted") && $club->isDeleted() && $thisUser->getId() == $club->getOwner()->getId() && !$club->isBanned()}
<form action="/club{$club->getId()}/restore" method="POST">
<input type="hidden" name="hash" value="{$csrfToken}" />
<input class="button primary big max" type="submit" id="profile_link" value="{_restore_group}" />
</form>
{/if}

{if $club->getSubscriptionStatus($thisUser) == false}
{else}
<form action="/setSub/club" method="post" class="form_gr">
<input type="hidden" name="act" value="rem" />
<input type="hidden" name="id" value="{$club->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" class="button primary big max" value="{_"leave_community"}" />
</form>
{/if}
{/ifset}

{if !$club->isBanned()}
<p style="text-align:center;font-size: 13px;">{_group_was_deleted}</p>
{else}
<p style="text-align:center;font-size: 13px;">{_group_was_blocked}</p>
<p style="text-align:center;font-size: 13px;">{_ban_reason_g}: {$club->getBanReason()}</p>
{/if}
</div>
</div>

{else}

<div id="profile_basicInfo" class="contentWrap">
<div class="content">
<div class="pure-g" style="padding-bottom: 12px;">
Expand Down Expand Up @@ -195,6 +152,5 @@
{presenter "openvk!Wall->wallEmbedded", -$club->getId()}
</div>
</div>
{/if}

{/block}
40 changes: 1 addition & 39 deletions tpl/Notes/List.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,71 +22,33 @@
{* BEGIN ELEMENTS DESCRIPTION *}

{block body}
<style>
#userContent img {
max-width: 245pt;
max-height: 200pt;
}

#userContent blockquote {
background-color: #f3f3f3;
border-bottom: 5px solid #969696;
padding: 1;
}

#userContent cite {
margin-top: 1em;
display: block;
}

#userContent cite::before {
content: "— ";
}

#userContent .underline {
text-decoration: underline;
}
</style>

<div class="container_gray" style="background: white; border-top: none;">
<div style="padding-bottom: 0px; padding-top: 0;" class="summaryBar">
<div class="summary" style="padding-bottom:5px">
{tr("notes_list", $count)}
<span n:if="isset($thisUser) && $thisUser->getId() == $owner->getId()" style="float:right;">
<a href="/notes/create">
<input type="button" value="{_create_note}">

</a>
</span>
</div>
<hr />
</div>
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
{if sizeof($data) > 0}

<div n:foreach="$data as $dat" style="margin-left:10px;" onclick="location.href = '/note'+{$dat->getPrettyId()}">
<article class="note_body" id="userContent" style="width: 540px; display: inline-block; margin-bottom: 35px;">
<article class="note_body list_w_link" id="userContent" style="width: 540px; display: inline-block; margin-bottom: 35px;">
<div class="note_header">
<div class="note_title">
<div class="note_title">
<a href="/note{$dat->getPrettyId()}">{$dat->getName()}</a>
</div>
</div>
<div class="byline">
{$dat->getPublicationTime()}
<span n:if="$dat->getEditTime() > $dat->getPublicationTime()">({_edited} {$dat->getEditTime()})</span>
</div>
</div>
<div style="margin-left: 6px;">
{$dat->getText(750)|noescape}
</div>
<div class="note_footer" style="margin: 10px 0 0;">
<div class="comments_count">
<a href="/note{$dat->getPrettyId()}">
<input type="button" value="{_comments}">
</a>
</div>
</div>
</article>
</div>

Expand Down
16 changes: 4 additions & 12 deletions tpl/Search/Index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,23 @@
{elseif $type == "posts"}
<div n:foreach="$data as $dat" class="content">
{if $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()}
{_dont_need_to_see_post}
brbrevht
{else}
{include "../components/post.xml", post => $dat, commentSection => true, onWallOf => true}
{/if}
</div>
{elseif $type == "comments"}
<div n:foreach="$data as $dat" class="content">
{if $dat->getTarget()->isDeleted()}
{_dont_need_to_see_comment}
{else}
{include "../components/comment.xml", comment => $dat, linkW => true}
{/if}
{include "../components/comment.xml", comment => $dat, linkW => true}
</div>
{elseif $type == "videos"}
{foreach $data as $dat}
<div class="content">
{if $dat->getOwner()->isDeleted()}
{_dont_need_to_see_video}
{else}
{include "../components/video.xml", video => $dat}
{/if}
{include "../components/video.xml", video => $dat}
</div>
{/foreach}
{elseif $type == "audios"}
хуй
privet
{/if}
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
Expand Down
70 changes: 0 additions & 70 deletions tpl/User/View.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,74 +48,6 @@
{block body}
{if !$user->isBanned()}

{if method_exists($user, "canBeViewedBy") && !$user->canBeViewedBy($thisUser ?? NULL)}
<div n:if="!is_null($alert = $user->getAlert())" class="alert fake">{strpos($alert, "@") === 0 ? tr(substr($alert, 1)) : $alert}</div>
<div id="profile_basicInfo" class="contentWrap">
<div class="content">
<div class="pure-g" style="padding-bottom: 12px;">
<div id="profile_basicInfo__avatar">
<img src="{$user->getAvatarUrl()}"
alt="{$user->getCanonicalName()}" />
</div>

<div id="profile_basicInfo__info" class="pure-u-3-4">
<h2 class="no-margin text_profile_center">{$user->getFullName()} <img n:if="$user->isVerified()" class="name-checkmark" src="/themepack/mobile_ovk/0.0.1.0/resource/verify_badge.png"></h2>

{if !is_null($user->getStatus())}
<span class="span_status">{$user->getStatus()}</span>
{/if}
<br/>

{if $user->isOnline()}
<span class="span_status">{_online}</span>
{else}
<span class="span_status">{_was_online} {$user->getOnline()}</span>
{/if}

</div>
</div>
</div>
{ifset $thisUser}
{var subStatus = $user->getSubscriptionStatus($thisUser)}
{if $subStatus === 0}
<form action="/setSub/user" method="post" class="form_gr" id="addToFriends">
<input type="hidden" name="act" value="add" />
<input type="hidden" name="id" value="{$user->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" style="margin-left: 5px;width: 98%;" class="button primary big max" value="{_friends_add}" />
</form>
{elseif $subStatus === 1}
<form action="/setSub/user" method="post" class="form_gr" id="addToFriends">
<input type="hidden" name="act" value="add" />
<input type="hidden" name="id" value="{$user->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" style="margin-left: 5px;width: 98%;" class="button primary big max" value="{_friends_accept}" />
</form>
{elseif $subStatus === 2}
<form action="/setSub/user" method="post" class="form_gr" id="addToFriends">
<input type="hidden" name="act" value="rem" />
<input type="hidden" name="id" value="{$user->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" style="margin-left: 5px;width: 98%;" class="button primary big max" value="{_friends_reject}" />
</form>
{/if}
{/ifset}
<div class="alert yellow">
{var $m = $user->isFemale() ? "f" : "m"}
<b>{tr("limited_access_to_page_$m", $user->getFirstName())}</b><br/>

{if isset($thisUser)}
{if $subStatus != 2}
{_you_can_add}
<a href="javascript:addToFriends.submit()">{tr("add_to_friends_$m")}</a>
{/if}
{/if}
</div>
</div>
</div>

{else}

<div n:if="!is_null($alert = $user->getAlert())" class="alert fake">{strpos($alert, "@") === 0 ? tr(substr($alert, 1)) : $alert}</div>


Expand Down Expand Up @@ -455,8 +387,6 @@
{presenter "openvk!Wall->wallEmbedded", $user->getId()}
</div>
</div>
{/if}

{else} {* isBanned() *}
{include "banned.xml"}
{/if}
Expand Down
8 changes: 1 addition & 7 deletions tpl/components/video.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{if $video->canBeViewedBy($thisUser ?? NULL)}

<table>
<tbody>
<tr>
Expand Down Expand Up @@ -34,8 +32,4 @@
</td>
</tr>
</tbody>
</table>

{else}
{_no_access_abstract}
{/if}
</table>

0 comments on commit 5019cfb

Please sign in to comment.