1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-06 18:18:09 +03:00

шаблоны настроек и управления пользователями блога

This commit is contained in:
Mzhelskiy Maxim 2009-02-21 18:36:14 +00:00
parent 7d9540ed8a
commit bfb756d5b6
13 changed files with 100 additions and 16 deletions

View file

@ -234,6 +234,12 @@ class ActionBlog extends Action {
if (!$oBlog=$this->Blog_GetBlogById($sBlogId)) {
return parent::EventNotFound();
}
/**
* Проверяем тип блога
*/
if ($oBlog->getType()=='personal') {
return parent::EventNotFound();
}
/**
* Проверям авторизован ли пользователь
*/

View file

@ -35,8 +35,8 @@ if ($aComments=$oEngine->Comment_GetCommentsAllGroup(20)) {
$oEngine->Viewer_Assign('aComments',$aComments);
$sTextResult=$oEngine->Viewer_Fetch("block.stream_comment.tpl");
} else {
$sMsgTitle='Ошибка!';
$sMsg='Возникли проблемы, повторите позже.';
$sMsgTitle='Внимание!';
$sMsg='Нет комментариев.';
}

View file

@ -35,8 +35,8 @@ if ($oTopics=$oEngine->Topic_GetTopicsLast(20)) {
$oEngine->Viewer_Assign('oTopics',$oTopics);
$sTextResult=$oEngine->Viewer_Fetch("block.stream_topic.tpl");
} else {
$sMsgTitle='Ошибка!';
$sMsg='Возникли проблемы, повторите позже.';
$sMsgTitle='Внимание!';
$sMsg='Нет топиков.';
}

View file

@ -23,7 +23,7 @@
<span class="form_note">{$aLang.blog_create_url_notice}</span>
</p>
<p><label for="blog_type">{$aLang.blog_create_url}:</label>
<p><label for="blog_type">{$aLang.blog_create_type}:</label>
<select name="blog_type" id="blog_type" onChange="">
<option value="open">{$aLang.blog_create_type_open}</option>
</select><br />
@ -31,7 +31,7 @@
</p>
<p><label for="blog_description">{$aLang.blog_create_description}:</label>
<textarea name="blog_description" id="blog_description" rows="20">{$_aRequest.topic_text}</textarea><br />
<textarea name="blog_description" id="blog_description" rows="20">{$_aRequest.blog_description}</textarea><br />
<span class="form_note">{$aLang.blog_create_description_notice}</span>
</p>

View file

@ -0,0 +1,41 @@
{include file='header.tpl' menu='blog_edit' showWhiteBack=true}
<h1>{$aLang.blog_admin}: <a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_BLOG}/{$oBlogEdit->getUrl()}/">{$oBlogEdit->getTitle()}</a></h1>
{if $aBlogUsers}
<form action="" method="POST" enctype="multipart/form-data">
<table class="table-blog-users">
<thead>
<tr>
<td></td>
<td width="10%">{$aLang.blog_admin_users_administrator}</td>
<td width="10%">{$aLang.blog_admin_users_moderator}</td>
<td width="10%">{$aLang.blog_admin_users_reader}</td>
</tr>
</thead>
<tbody>
{foreach from=$aBlogUsers item=oBlogUser}
<tr>
<td class="username"><a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_PROFILE}/{$oBlogUser->getUserLogin()}/">{$oBlogUser->getUserLogin()}</a></td>
{if $oBlogUser->getUserId()==$oUserCurrent->getId()}
<td colspan="3" align="center">{$aLang.blog_admin_users_current_administrator}</td>
{else}
<td><input type="radio" name="user_rank[{$oBlogUser->getUserId()}]" value="administrator" {if $oBlogUser->getIsAdministrator()}checked{/if}/></td>
<td><input type="radio" name="user_rank[{$oBlogUser->getUserId()}]" value="moderator" {if $oBlogUser->getIsModerator()}checked{/if}/></td>
<td><input type="radio" name="user_rank[{$oBlogUser->getUserId()}]" value="reader" {if !$oBlogUser->getIsAdministrator() and !$oBlogUser->getIsModerator()}checked{/if}/></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
<input type="submit" name="submit_blog_admin" value="{$aLang.blog_admin_users_submit}">
</form>
{else}
{$aLang.blog_admin_users_empty}
{/if}
{include file='footer.tpl'}

View file

@ -1,4 +1,4 @@
{include file='header.light.tpl'}
{include file='header.light.tpl' noShowSystemMessage=true}
<div class="lite-center error">
<h1>{$aLang.error}: {$aMsgError[0].title}</h1>

View file

@ -0,0 +1,17 @@
{include file='header.tpl' menu='settings' showWhiteBack=true}
<h1>{$aLang.settings_invite}</h1>
<form action="" method="POST" enctype="multipart/form-data">
<p>
{$aLang.settings_invite_available}: <strong>{if $oUserCurrent->isAdministrator()}{$aLang.settings_invite_many}{else}{$iCountInviteAvailable}{/if}</strong><br />
{$aLang.settings_invite_used}: <strong>{$iCountInviteUsed}</strong>
</p>
<p>
<label for="invite_mail">{$aLang.settings_invite_mail}:</label><br />
<input type="text" class="w300" name="invite_mail" id="invite_mail"/><br />
<span class="form_note">{$aLang.settings_invite_mail_notice}</span>
</p>
<input type="submit" value="{$aLang.settings_invite_submit}" name="submit_invite" />
</form>
{include file='footer.tpl'}

View file

@ -0,0 +1,16 @@
{include file='header.tpl' menu='settings' showWhiteBack=true}
<h1>{$aLang.settings_tuning}</h1>
<strong>&nbsp;{$aLang.settings_tuning_notice}</strong>
<form action="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/tuning/" method="POST" enctype="multipart/form-data">
<p>
<label for=""><input {if $oUserCurrent->getSettingsNoticeNewTopic()}checked{/if} type="checkbox" id="settings_notice_new_topic" name="settings_notice_new_topic" value="1" class="checkbox" /> &mdash; {$aLang.settings_tuning_notice_new_topic}</label><br />
<label for=""><input {if $oUserCurrent->getSettingsNoticeNewComment()}checked{/if} type="checkbox" id="settings_notice_new_comment" name="settings_notice_new_comment" value="1" class="checkbox" /> &mdash; {$aLang.settings_tuning_notice_new_comment}</label><br />
<label for=""><input {if $oUserCurrent->getSettingsNoticeNewTalk()}checked{/if} type="checkbox" id="settings_notice_new_talk" name="settings_notice_new_talk" value="1" class="checkbox" /> &mdash; {$aLang.settings_tuning_notice_new_talk}</label><br />
<label for=""><input {if $oUserCurrent->getSettingsNoticeReplyComment()}checked{/if} type="checkbox" id="settings_notice_reply_comment" name="settings_notice_reply_comment" value="1" class="checkbox" /> &mdash; {$aLang.settings_tuning_notice_reply_comment}</label><br />
<label for=""><input {if $oUserCurrent->getSettingsNoticeNewFriend()}checked{/if} type="checkbox" id="settings_notice_new_friend" name="settings_notice_new_friend" value="1" class="checkbox" /> &mdash; {$aLang.settings_tuning_notice_new_friend}</label>
</p>
<p><input type="submit" name="submit_settings_tuning" value="{$aLang.settings_tuning_submit}" /></p>
</form>
{include file='footer.tpl'}

View file

@ -1,6 +1,6 @@
{include file='header.tpl' menu="blog" showWhiteBack=true}
{include file='header.tpl' menu="blog" }
<div class="top-topics">
<div class="topic top">
<h1>TOP топиков</h1>
<ul class="block-nav">
@ -12,6 +12,6 @@
</div>
{include file='topic_list.tpl'}
</div>
{include file='footer.tpl'}

View file

@ -19,4 +19,6 @@
<div id="container">
<h1 class="lite-header"><a href="{$DIR_WEB_ROOT}">Live<span>Street</span></a></h1>
{include file='system_message.tpl'}
{if !$noShowSystemMessage}
{include file='system_message.tpl'}
{/if}

View file

@ -115,7 +115,7 @@ var msgNoticeBox=new Roar({
{else}
<a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_TALK}/" class="message-empty"></a>
{/if}
{$aLang.user_settings} <a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/profile/">{$aLang.user_settings_profile}</a> | <a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/tuning/">{$aLang.user_settings_tuning}</a>
{$aLang.user_settings} <a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/profile/" class="author">{$aLang.user_settings_profile}</a> | <a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/tuning/" class="author">{$aLang.user_settings_tuning}</a>
</li>
<li>{$aLang.user_rating} <strong>{$oUserCurrent->getRating()}</strong></li>
</ul>
@ -168,4 +168,6 @@ var msgNoticeBox=new Roar({
<!-- Content -->
<div id="content">
{include file='system_message.tpl'}
{if !$noShowSystemMessage}
{include file='system_message.tpl'}
{/if}

View file

@ -70,7 +70,7 @@ var lsBlockLoaderClass = new Class({
msgErrorBox.alert('Error','Please try again later');
}
if (result.bStateError) {
msgErrorBox.alert(result.sMsgTitle,result.sMsg);
//msgErrorBox.alert(result.sMsgTitle,result.sMsg);
} else {
blockContent.set('html',result.sText);
}

View file

@ -1,7 +1,7 @@
<ul class="menu">
<li {if $sMenuItemSelect=='settings'}class="active"{/if}>
<a href="{$DIR_WEB_ROOT}/">{$aLang.settings_menu}</a>
<a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/">{$aLang.settings_menu}</a>
{if $sMenuItemSelect=='settings'}
<ul class="sub-menu" >
<li {if $sMenuSubItemSelect=='profile'}class="active"{/if}><div><a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/profile/">{$aLang.settings_menu_profile}</a></div></li>
@ -12,7 +12,7 @@
{if $USER_USE_INVITE}
<li {if $sMenuItemSelect=='invite'}class="active"{/if}>
<a href="{$DIR_WEB_ROOT}/">{$aLang.settings_menu_invite}</a>
<a href="{$DIR_WEB_ROOT}/{$ROUTE_PAGE_SETTINGS}/invite/">{$aLang.settings_menu_invite}</a>
</li>
{/if}