[legko.require("/_sys_/_head.html")]

[block.if block == 'base']
<div class="title">Хабарҳо</div>
    [block.if input.get.msg == "deleted"]
        <div class="error">Хабар бомуваффақият нест карда шуд.</div>
    [block.endif]
    [block.if input.get.msg == "cleaned"]
        <div class="error">Ҳамаи хабарҳо бомуваффақият нест карда шуданд. </div>
    [block.endif]
    [block.for news in elems]
       <div class="tj"><a href="/news.lm?id=[legko.news.id]">[legko.news.title] <span class="count">[legko.xtime(news.time)]</span></a></div>
        <div class="gb">[legko.cut(news.message, 0, 64)]...<br>
            <span class="error"><a href="/news.lm?id=[legko.news.id]">Бештар...</a></span>
        </div>
    [block.endfor]
    [block.if pages.api.isView]
        <div class="nav_list">
            [block.for page in pages.api.list]
                <a class="nav [block.if page.page == pages.api.current] nav_current[block.endif]" href="?page=[legko.page.page][legko.pages.api.url]">[legko.page.text]</a>
            [block.endfor]
        </div>
    [block.endif]
    [block.if user.auth]
        [block.if user.more.acl.isNewsWrite]
    <div class="tj"><a href="/news.lm?act=create"><span class="m plus"></span>Илова кардани хабар</a></div>
        [block.endif]
        [block.if user.more.acl.isNewsModer]
            <div class="tj"><a href="/news.lm?act=clean"><span class="m trashcan"></span>Нест кардани ҳамаи хабарҳо</a></div>
        [block.endif]
    [block.endif]
    
асоси1

[block.endif]
[block.if block == 'news_disabled']
<div class="title">Хатогӣ</div>
<div class="error">Бубахшед, аммо администратор хабарҳоро дар сайт ғайрифаъол кардааст.</div>
асоси1
[block.endif]
[block.if block == 'no_access']
<div class="title">Хатогӣ</div>
<div class="error">Бубахшед, аммо шумо барои иҷрои ин амал иҷозатҳои кофӣ надоред.</div>

асоси1

[block.endif]
[block.if block == 'delete']
<div class="title">Нест кардани хабарҳо</div>
<form method="POST">
    Тасдиқи нест кардани хабарҳо <var>[legko.post.title]</var> ки офарида шудааст <var>[legko.xtime(post.time)]</var><br>
    Хабар: <div class="quote">[legko.post.message]</div>
    <input type="submit" name="send" value="Нест кардан">
</form>
<div class="tj"><a href="/news.lm"><span class="m undo2"></span>Ба қафо рафтан</a></div>

асоси1

[block.endif]
[block.if block == 'clean']
<div class="title">Ҳамаи хабарҳоро нест кардан</div>
<form method="POST" class="">
    Тасдиқи нест кардани<var>ҳамаи</var> хабарҳо<br>
    <input type="submit" name="send" value="Ҳамаашро нест кардан">
</form>
<div class="tj"><a href="/news.lm"><span class="m undo2"></span>Ба қафо рафтан</a></div>

асоси1

[block.endif]
[block.if block == '404']
<div class="title">Хатогӣ</div>
<div class="error">Хабар ёфт нашуд</div>
<div class="tj"><a href="/news.lm"><span class="m undo2"></span>Ба қафо рафтан </a></div>

асоси1

[block.endif]
[block.if block == 'create']
<div class="title">Илова кардани хабар</div>
<form method="POST" class="">
    Унвон (Лимит 255 аломат):<br>
    <input type="text" name="title" value="[legko.input.post.title]"><br>
    Паём:<br>
    <textarea data-bbcode="1" name="message">[legko.input.post.message]</textarea><br>
    <input type="submit" name="send" value="Илова кардан">
</form>
<div class="tj"><a href="/news.lm"><span class="m undo2"></span>Ба қафо рафтан</a></div>

асоси1

[block.endif]
[block.if block == 'edit']
<div class="title">Танзими хабар</div>
<form method="POST" class="">
    Унвон (Лимит 255 аломат):<br>
    <input type="text" name="title" value="[legko.post.title]"><br>
    Паём:<br>
    <textarea data-bbcode="1" name="message">[legko.post.message]</textarea><br>
    <input type="submit" name="send" value="Захира кардан">
</form>
<div class="tj"><a href="/news.lm?id=[legko.global.id]"><span class="m undo2"></span>Ба қафо рафтан</a></div>

асоси1

[block.endif]
[block.if block == 'view']
<div class="title">[legko.post.title]</div>
<div class="gb">[legko.post.message|raw]<br>
<span class="error">📝 Нашр кардааст:</span><span class="yes"> &nbsp;[block.if isEmpty(post.user)] 🧑‍💻Администратор</span>[block.else]<a href="/profile.lm?id=[legko.post.user.id]">[legko.post.user.login]</a>[block.endif]</div>
[block.if user.auth and user.more.acl.isNewsModer]
<div class="tj"><a href="/news.lm?id=[legko.post.id]&act=edit"><span class="m settings"></span>Танзими хабар</a></div>
<div class="tj"><a href="/news.lm?id=[legko.post.id]&act=del"><span class="m trashcan"></span>Нест кардани хабар</a></div>
[block.endif]
<div class="tj"><a href="/news.lm"><span class="m undo2"></span>Ба қафо рафтан</a></div>

асоси1

[block.endif]

[legko.require("/_sys_/_foot.html")]
