|
From: <al...@us...> - 2008-10-17 17:17:26
|
Revision: 730
http://sciret.svn.sourceforge.net/sciret/?rev=730&view=rev
Author: alpeb
Date: 2008-10-17 17:17:21 +0000 (Fri, 17 Oct 2008)
Log Message:
-----------
show different title in template, depending on whether the item is being edited or added
Modified Paths:
--------------
trunk/templates/EditArticle.tpl
trunk/templates/EditBookmark.tpl
trunk/templates/EditUser.tpl
trunk/views/EditArticle.php
trunk/views/EditBookmark.php
trunk/views/EditUser.php
Modified: trunk/templates/EditArticle.tpl
===================================================================
--- trunk/templates/EditArticle.tpl 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/templates/EditArticle.tpl 2008-10-17 17:17:21 UTC (rev 730)
@@ -17,7 +17,14 @@
<!-- Source file for Rich Text Editor-->
<script src="javascript/yui/build/editor/editor-beta-min.js"></script>
-<h1>Add Article</h1>
+<h1>
+ <!-- BEGIN addArticleTitle_block -->
+ [l]Add Article[/l]
+ <!-- END addArticleTitle_block -->
+ <!-- BEGIN editArticleTitle_block -->
+ [l]Edit Article[/l]
+ <!-- END editArticleTitle_block -->
+</h1>
<form name="saveArticleForm" method="POST" action="{formAction}">
<input type="hidden" name="draft" value="0" />
Modified: trunk/templates/EditBookmark.tpl
===================================================================
--- trunk/templates/EditBookmark.tpl 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/templates/EditBookmark.tpl 2008-10-17 17:17:21 UTC (rev 730)
@@ -9,7 +9,14 @@
*/
-->
-<h1>Add Bookmark</h1>
+<h1>
+ <!-- BEGIN editBookmarkTitle_block -->
+ [l]Edit Bookmark[/l]
+ <!-- END editBookmarkTitle_block -->
+ <!-- BEGIN addBookmarkTitle_block -->
+ [l]Add Bookmark[/l]
+ <!-- END addBookmarkTitle_block -->
+</h1>
<form name="saveArticleForm" method="POST" action="{formAction}">
<input type="hidden" name="draft" value="0" />
Modified: trunk/templates/EditUser.tpl
===================================================================
--- trunk/templates/EditUser.tpl 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/templates/EditUser.tpl 2008-10-17 17:17:21 UTC (rev 730)
@@ -9,7 +9,14 @@
*/
-->
-<h1>[l]Edit {userName}[l]</h1>
+<h1>
+ <!-- BEGIN editUserTitle_block -->
+ [l]Edit {userName}[/l]
+ <!-- END editUserTitle_block -->
+ <!-- BEGIN addUserTitle_block -->
+ [l]New User[/l]
+ <!-- END addUserTitle_block -->
+</h1>
<form method="post" action="{formAction}">
<input type="hidden" name="userId" value="{userId}" />
Modified: trunk/views/EditArticle.php
===================================================================
--- trunk/views/EditArticle.php 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/views/EditArticle.php 2008-10-17 17:17:21 UTC (rev 730)
@@ -20,6 +20,8 @@
$selectedCategory = 0;
$this->tpl->set_file('edit_article', 'EditArticle.tpl');
+ $this->tpl->set_block('edit_article', 'addArticleTitle_block', 'addArticleTitle');
+ $this->tpl->set_block('edit_article', 'editArticleTitle_block', 'editArticleTitle');
$this->tpl->set_block('edit_article', 'answer_question_block', 'answer_question');
$this->tpl->set_block('edit_article', 'article_id_block', 'article_id');
$this->tpl->set_block('edit_article', 'usage_block', 'usage_id');
@@ -64,6 +66,8 @@
$this->tpl->set_var('removeExpDateLinkDisplay', '');
}
+ $this->tpl->parse('editArticleTitle', 'editArticleTitle_block');
+ $this->tpl->set_var('addArticleTitle', '');
$this->tpl->parse('article_id', 'article_id_block');
if ($this->user->isAdmin()) {
@@ -102,6 +106,9 @@
$this->tpl->set_var('publicationNotice', $this->user->lang('Your article won\'t be available publicly until it is explicitly set as "Published"'));
}
+ $this->tpl->parse('addArticleTitle', 'addArticleTitle_block');
+ $this->tpl->set_var('editArticleTitle', '');
+
$this->tpl->set_var('usage_id', '');
}
$this->tpl->parse('saveAsDraftButton', 'saveAsDraftButton_block');
Modified: trunk/views/EditBookmark.php
===================================================================
--- trunk/views/EditBookmark.php 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/views/EditBookmark.php 2008-10-17 17:17:21 UTC (rev 730)
@@ -19,6 +19,8 @@
$selectedCategory = 0;
$this->tpl->set_file('edit_bookmark', 'EditBookmark.tpl');
+ $this->tpl->set_block('edit_bookmark', 'editBookmarkTitle_block', 'editBookmarkTitle');
+ $this->tpl->set_block('edit_bookmark', 'addBookmarkTitle_block', 'addBookmarkTitle');
$this->tpl->set_block('edit_bookmark', 'bookmark_id_block', 'bookmark_id');
$this->tpl->set_block('edit_bookmark', 'categories_block', 'categories');
$this->tpl->set_block('edit_bookmark', 'saveAsDraftButton_block', 'saveAsDraftButton');
@@ -50,6 +52,8 @@
$this->tpl->set_var('removeExpDateLinkDisplay', '');
}
+ $this->tpl->parse('editBookmarkTitle', 'editBookmarkTitle_block');
+ $this->tpl->set_var('addBookmarkTitle', '');
$this->tpl->parse('bookmark_id', 'bookmark_id_block');
$selectedCategory = $article->getCategoryId();
} else {
@@ -66,6 +70,8 @@
} else {
$this->tpl->set_var('publicationNotice', $this->user->lang('Your bookmark won\'t be available publicly until it is explicitly set as "Published"'));
}
+ $this->tpl->parse('addBookmarkTitle', 'addBookmarkTitle_block');
+ $this->tpl->set_var('editBookmarkTitle', '');
$this->tpl->parse('saveAsDraftButton', 'saveAsDraftButton_block');
}
Modified: trunk/views/EditUser.php
===================================================================
--- trunk/views/EditUser.php 2008-10-17 17:16:32 UTC (rev 729)
+++ trunk/views/EditUser.php 2008-10-17 17:17:21 UTC (rev 730)
@@ -24,6 +24,8 @@
$userId = isset($_GET['userId'])? (int)$_GET['userId'] : 0;
$this->tpl->set_file('addUser', 'EditUser.tpl');
+ $this->tpl->set_block('addUser', 'editUserTitle_block', 'editUserTitle');
+ $this->tpl->set_block('addUser', 'addUserTitle_block', 'addUserTitle');
$this->tpl->set_block('addUser', 'adminAccess_block', 'adminAccess');
$this->tpl->set_var('formAction', Library::getLink(array('action' => 'EditUser')));
@@ -40,6 +42,9 @@
'password2' => '',
'checkedAdminAccess' => $user->isAdmin()? 'checked="true" ' : '',
));
+
+ $this->tpl->parse('editUserTitle', 'editUserTitle_block');
+ $this->tpl->set_var('addUserTitle', '');
} else {
$this->tpl->set_var(array(
'userId' => 0,
@@ -51,6 +56,9 @@
'password2' => isset($_SESSION['formFields']['password'])? $_SESSION['formFields']['password'] : '',
'checkedAdminAccess' => (isset($_SESSION['formFields']['checkedAdminAccess']) && $_SESSION['formFields']['checkedAdminAccess'])? 'checked="true"' : '',
));
+
+ $this->tpl->parse('addUserTitle', 'addUserTitle_block');
+ $this->tpl->set_var('editUserTitle', '');
}
if ($this->user->isAdmin()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|