diff --git a/src/IDF/Template/Markdown.php b/src/IDF/Template/Markdown.php index 895d511..c058d63 100644 --- a/src/IDF/Template/Markdown.php +++ b/src/IDF/Template/Markdown.php @@ -72,12 +72,12 @@ class IDF_Template_Markdown extends Pluf_Template_Tag $pages = Pluf::factory('IDF_Wiki_Page')->getList(array('filter'=>$sql->gen())); if ($pages->count() != 1 and $this->request->rights['hasWikiAccess'] and !$this->request->user->isAnonymous()) { - return ' '.$m[1].''; + return ' '.$m[1].''; } if (!$this->request->rights['hasWikiAccess'] or $pages->count() == 0) { return $m[1]; } - return ''.$m[1].''; + return ''.$m[1].''; } function callbackEmbeddedDoc($m) diff --git a/src/IDF/Views/Wiki.php b/src/IDF/Views/Wiki.php index 2a837a7..0e75c47 100644 --- a/src/IDF/Views/Wiki.php +++ b/src/IDF/Views/Wiki.php @@ -32,10 +32,10 @@ Pluf::loadFunction('Pluf_Shortcuts_GetFormForModel'); class IDF_Views_Wiki { /** - * View list of issues for a given project. + * View list of pages for a given project. */ - public $index_precond = array('IDF_Precondition::accessWiki'); - public function index($request, $match, $api=false) + public $listPages_precond = array('IDF_Precondition::accessWiki'); + public function listPages($request, $match, $api=false) { $prj = $request->project; $title = sprintf(__('%s Documentation'), (string) $prj); @@ -46,8 +46,8 @@ class IDF_Views_Wiki 'shortname' => $prj->shortname, 'current_user' => $request->user); $pag->summary = __('This table shows the documentation pages.'); - $pag->action = array('IDF_Views_Wiki::index', array($prj->shortname)); - $pag->edit_action = array('IDF_Views_Wiki::view', 'shortname', 'title'); + $pag->action = array('IDF_Views_Wiki::listPages', array($prj->shortname)); + $pag->edit_action = array('IDF_Views_Wiki::viewPage', 'shortname', 'title'); $sql = 'project=%s'; $ptags = self::getWikiTags($prj); $dtag = array_pop($ptags); // The last tag is the deprecated tag. @@ -67,7 +67,7 @@ class IDF_Views_Wiki $pag->no_results_text = __('No documentation pages were found.'); $pag->sort_order = array('title', 'ASC'); $pag->setFromRequest($request); - return Pluf_Shortcuts_RenderToResponse('idf/wiki/index.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/listPages.html', array( 'page_title' => $title, 'pages' => $pag, @@ -82,7 +82,7 @@ class IDF_Views_Wiki { $prj = $request->project; if (!isset($request->REQUEST['q']) or trim($request->REQUEST['q']) == '') { - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::listPages', array($prj->shortname)); return new Pluf_HTTP_Response_Redirect($url); } @@ -100,7 +100,7 @@ class IDF_Views_Wiki 'current_user' => $request->user); $pag->summary = __('This table shows the pages found.'); $pag->action = array('IDF_Views_Wiki::search', array($prj->shortname), array('q'=> $q)); - $pag->edit_action = array('IDF_Views_Wiki::view', 'shortname', 'title'); + $pag->edit_action = array('IDF_Views_Wiki::viewPage', 'shortname', 'title'); $pag->extra_classes = array('right', '', 'a-c'); $list_display = array( 'title' => __('Page Title'), @@ -122,8 +122,8 @@ class IDF_Views_Wiki /** * View list of pages with a given label. */ - public $listLabel_precond = array('IDF_Precondition::accessWiki'); - public function listLabel($request, $match) + public $listPagesWithLabel_precond = array('IDF_Precondition::accessWiki'); + public function listPagesWithLabel($request, $match) { $prj = $request->project; $tag = Pluf_Shortcuts_GetObjectOr404('IDF_Tag', $match[2]); @@ -140,8 +140,8 @@ class IDF_Views_Wiki 'shortname' => $prj->shortname); $pag->summary = sprintf(__('This table shows the documentation pages with label %s.'), (string) $tag); $pag->forced_where = new Pluf_SQL('project=%s AND idf_tag_id=%s', array($prj->id, $tag->id)); - $pag->action = array('IDF_Views_Wiki::listLabel', array($prj->shortname, $tag->id)); - $pag->edit_action = array('IDF_Views_Wiki::view', 'shortname', 'title'); + $pag->action = array('IDF_Views_Wiki::listPagesWithLabel', array($prj->shortname, $tag->id)); + $pag->edit_action = array('IDF_Views_Wiki::viewPage', 'shortname', 'title'); $pag->extra_classes = array('right', '', 'a-c'); $list_display = array( 'title' => __('Page Title'), @@ -152,7 +152,7 @@ class IDF_Views_Wiki $pag->items_per_page = 25; $pag->no_results_text = __('No documentation pages were found.'); $pag->setFromRequest($request); - return Pluf_Shortcuts_RenderToResponse('idf/wiki/index.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/listPages.html', array( 'page_title' => $title, 'label' => $tag, @@ -165,9 +165,9 @@ class IDF_Views_Wiki /** * Create a new documentation page. */ - public $create_precond = array('IDF_Precondition::accessWiki', - 'Pluf_Precondition::loginRequired'); - public function create($request, $match) + public $createPage_precond = array('IDF_Precondition::accessWiki', + 'Pluf_Precondition::loginRequired'); + public function createPage($request, $match) { $prj = $request->project; $title = __('New Page'); @@ -179,10 +179,10 @@ class IDF_Views_Wiki )); if ($form->isValid() and !isset($request->POST['preview'])) { $page = $form->save(); - $urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + $urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($prj->shortname, $page->title)); $request->user->setMessage(sprintf(__('The page %s has been created.'), $urlpage, Pluf_esc($page->title))); - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::listPages', array($prj->shortname)); return new Pluf_HTTP_Response_Redirect($url); } elseif (isset($request->POST['preview'])) { @@ -196,7 +196,7 @@ class IDF_Views_Wiki 'project' => $prj, 'user' => $request->user)); } - return Pluf_Shortcuts_RenderToResponse('idf/wiki/create.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/createPage.html', array( 'auto_labels' => self::autoCompleteArrays($prj), 'page_title' => $title, @@ -209,8 +209,8 @@ class IDF_Views_Wiki /** * View a documentation page. */ - public $view_precond = array('IDF_Precondition::accessWiki'); - public function view($request, $match) + public $viewPage_precond = array('IDF_Precondition::accessWiki'); + public function viewPage($request, $match) { $prj = $request->project; // Find the page @@ -239,7 +239,7 @@ class IDF_Views_Wiki $false = Pluf_DB_BooleanToDb(false, $page->getDbConnection()); $revs = $page->get_revisions_list(array('order' => 'creation_dtime DESC', 'filter' => 'is_head='.$false)); - return Pluf_Shortcuts_RenderToResponse('idf/wiki/view.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/viewPage.html', array( 'page_title' => $title, 'page' => $page, @@ -255,9 +255,9 @@ class IDF_Views_Wiki /** * Remove a revision of a page. */ - public $deleteRev_precond = array('IDF_Precondition::accessWiki', - 'IDF_Precondition::projectMemberOrOwner'); - public function deleteRev($request, $match) + public $deletePageRev_precond = array('IDF_Precondition::accessWiki', + 'IDF_Precondition::projectMemberOrOwner'); + public function deletePageRev($request, $match) { $prj = $request->project; $oldrev = Pluf_Shortcuts_GetObjectOr404('IDF_Wiki_PageRevision', $match[2]); @@ -269,7 +269,7 @@ class IDF_Views_Wiki if ($request->method == 'POST') { $oldrev->delete(); $request->user->setMessage(__('The old revision has been deleted.')); - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($prj->shortname, $page->title)); return new Pluf_HTTP_Response_Redirect($url); } @@ -279,7 +279,7 @@ class IDF_Views_Wiki $false = Pluf_DB_BooleanToDb(false, $page->getDbConnection()); $revs = $page->get_revisions_list(array('order' => 'creation_dtime DESC', 'filter' => 'is_head='.$false)); - return Pluf_Shortcuts_RenderToResponse('idf/wiki/delete.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/deletePageRev.html', array( 'page_title' => $title, 'page' => $page, @@ -294,9 +294,9 @@ class IDF_Views_Wiki /** * View a documentation page. */ - public $update_precond = array('IDF_Precondition::accessWiki', - 'Pluf_Precondition::loginRequired'); - public function update($request, $match) + public $updatePage_precond = array('IDF_Precondition::accessWiki', + 'Pluf_Precondition::loginRequired'); + public function updatePage($request, $match) { $prj = $request->project; // Find the page @@ -317,10 +317,10 @@ class IDF_Views_Wiki $form = new IDF_Form_WikiUpdate($request->POST, $params); if ($form->isValid() and !isset($request->POST['preview'])) { $page = $form->save(); - $urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + $urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($prj->shortname, $page->title)); $request->user->setMessage(sprintf(__('The page %s has been updated.'), $urlpage, Pluf_esc($page->title))); - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::listPages', array($prj->shortname)); return new Pluf_HTTP_Response_Redirect($url); } elseif (isset($request->POST['preview'])) { @@ -330,7 +330,7 @@ class IDF_Views_Wiki $form = new IDF_Form_WikiUpdate(null, $params); } - return Pluf_Shortcuts_RenderToResponse('idf/wiki/update.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/updatePage.html', array( 'auto_labels' => self::autoCompleteArrays($prj), 'page_title' => $title, @@ -345,9 +345,9 @@ class IDF_Views_Wiki /** * Delete a Wiki page. */ - public $delete_precond = array('IDF_Precondition::accessWiki', - 'IDF_Precondition::projectMemberOrOwner'); - public function delete($request, $match) + public $deletePage_precond = array('IDF_Precondition::accessWiki', + 'IDF_Precondition::projectMemberOrOwner'); + public function deletePage($request, $match) { $prj = $request->project; $page = Pluf_Shortcuts_GetObjectOr404('IDF_Wiki_Page', $match[2]); @@ -358,7 +358,7 @@ class IDF_Views_Wiki if ($form->isValid()) { $form->save(); $request->user->setMessage(__('The documentation page has been deleted.')); - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::listPages', array($prj->shortname)); return new Pluf_HTTP_Response_Redirect($url); } @@ -370,7 +370,7 @@ class IDF_Views_Wiki $false = Pluf_DB_BooleanToDb(false, $page->getDbConnection()); $revs = $page->get_revisions_list(array('order' => 'creation_dtime DESC', 'filter' => 'is_head='.$false)); - return Pluf_Shortcuts_RenderToResponse('idf/wiki/deletepage.html', + return Pluf_Shortcuts_RenderToResponse('idf/wiki/deletePage.html', array( 'page_title' => $title, 'page' => $page, diff --git a/src/IDF/Wiki/Page.php b/src/IDF/Wiki/Page.php index 00965fd..ff06082 100644 --- a/src/IDF/Wiki/Page.php +++ b/src/IDF/Wiki/Page.php @@ -185,7 +185,7 @@ class IDF_Wiki_Page extends Pluf_Model */ public function timelineFragment($request) { - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($request->project->shortname, $this->title)); $out = ''. @@ -202,7 +202,7 @@ class IDF_Wiki_Page extends Pluf_Model public function feedFragment($request) { $url = Pluf::f('url_base') - .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($request->project->shortname, $this->title)); $title = sprintf(__('%s: Documentation page %s added - %s'), diff --git a/src/IDF/Wiki/PageRevision.php b/src/IDF/Wiki/PageRevision.php index dd40a2b..bcd3ef5 100644 --- a/src/IDF/Wiki/PageRevision.php +++ b/src/IDF/Wiki/PageRevision.php @@ -156,7 +156,7 @@ class IDF_Wiki_PageRevision extends Pluf_Model public function timelineFragment($request) { $page = $this->get_wikipage(); - $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + $url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($request->project->shortname, $page->title)); $out = "\n".''. @@ -195,13 +195,13 @@ class IDF_Wiki_PageRevision extends Pluf_Model $page = $this->get_wikipage(); if (!$this->is_head) { $url = Pluf::f('url_base') - .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($request->project->shortname, $page->title), array('rev' => $this->id)); } else { $url = Pluf::f('url_base') - .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view', + .Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::viewPage', array($request->project->shortname, $page->title)); } diff --git a/src/IDF/conf/urls.php b/src/IDF/conf/urls.php index 8376683..36d60f7 100644 --- a/src/IDF/conf/urls.php +++ b/src/IDF/conf/urls.php @@ -265,12 +265,12 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/source/repo/(.*)$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'index'); + 'method' => 'listPages'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/create/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'create'); + 'method' => 'createPage'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/search/$#', 'base' => $base, @@ -280,27 +280,27 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/search/$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/label/(\d+)/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'listLabel'); + 'method' => 'listPagesWithLabel'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/update/(.*)/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'update'); + 'method' => 'updatePage'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/delrev/(\d+)/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'deleteRev'); + 'method' => 'deletePageRev'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/doc/delete/(\d+)/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'delete'); + 'method' => 'deletePage'); $ctl[] = array('regex' => '#^/p/([\-\w]+)/page/(.*)/$#', 'base' => $base, 'model' => 'IDF_Views_Wiki', - 'method' => 'view'); + 'method' => 'viewPage'); // ---------- Downloads ------------------------------------ diff --git a/src/IDF/templates/idf/base-full.html b/src/IDF/templates/idf/base-full.html index ff0d1e4..bee4be8 100644 --- a/src/IDF/templates/idf/base-full.html +++ b/src/IDF/templates/idf/base-full.html @@ -44,7 +44,7 @@ {if $project} {trans 'Project Home'} {if $hasDownloadsAccess} {trans 'Downloads'}{/if} -{if $hasWikiAccess} {trans 'Documentation'}{/if} +{if $hasWikiAccess} {trans 'Documentation'}{/if} {if $hasIssuesAccess} {trans 'Issues'}{/if} {if $hasSourceAccess} {trans 'Source'}{/if} {if $hasReviewAccess} {trans 'Code Review'}{/if} diff --git a/src/IDF/templates/idf/base.html b/src/IDF/templates/idf/base.html index a5a1b02..91b2eda 100644 --- a/src/IDF/templates/idf/base.html +++ b/src/IDF/templates/idf/base.html @@ -44,7 +44,7 @@ {if $project} {trans 'Project Home'} {if $hasDownloadsAccess} {trans 'Downloads'}{/if} -{if $hasWikiAccess} {trans 'Documentation'}{/if} +{if $hasWikiAccess} {trans 'Documentation'}{/if} {if $hasIssuesAccess} {trans 'Issues'}{/if} {if $hasSourceAccess} {trans 'Source'}{/if} {if $hasReviewAccess} {trans 'Code Review'}{/if} diff --git a/src/IDF/templates/idf/js-hotkeys.html b/src/IDF/templates/idf/js-hotkeys.html index dc5e2c6..dc537a9 100644 --- a/src/IDF/templates/idf/js-hotkeys.html +++ b/src/IDF/templates/idf/js-hotkeys.html @@ -7,7 +7,7 @@ {if $hasIssuesAccess}{hotkey 'Shift+a', 'IDF_Views_Issue::create', array($project.shortname)} {hotkey 'Shift+i', 'IDF_Views_Issue::index', array($project.shortname)}{/if} {if $hasDownloadsAccess}{hotkey 'Shift+d', 'IDF_Views_Download::index', array($project.shortname)}{/if} -{if $hasWikiAccess}{hotkey 'Shift+o', 'IDF_Views_Wiki::index', array($project.shortname)}{/if} +{if $hasWikiAccess}{hotkey 'Shift+o', 'IDF_Views_Wiki::listPages', array($project.shortname)}{/if} {if $hasSourceAccess}{hotkey 'Shift+s', 'IDF_Views_Source::treeBase', array($project.shortname, $project.getScmRoot())}{/if} {if $hasIssuesAccess and !$user.isAnonymous()} {hotkey 'Shift+m', 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')} diff --git a/src/IDF/templates/idf/project/home.html b/src/IDF/templates/idf/project/home.html index d8b468d..b73dd7a 100644 --- a/src/IDF/templates/idf/project/home.html +++ b/src/IDF/templates/idf/project/home.html @@ -20,9 +20,9 @@ {if count($pages) > 0}

{trans 'Featured Documentation'}
{foreach $pages as $page} -{$page.title}
+{$page.title}
{/foreach} - {trans 'show more...'} + {trans 'show more...'} {/if} {assign $ko = 'owners'} {assign $km = 'members'} diff --git a/src/IDF/templates/idf/wiki/base.html b/src/IDF/templates/idf/wiki/base.html index 7a4fe0f..807c271 100644 --- a/src/IDF/templates/idf/wiki/base.html +++ b/src/IDF/templates/idf/wiki/base.html @@ -2,9 +2,9 @@ {block tabwiki} class="active"{/block} {block subtabs}

-{trans 'List Pages'} -{if !$user.isAnonymous()} | {trans 'New Page'} {/if} -{if !$user.isAnonymous() and $inView} | {trans 'Update This Page'} {/if} +{trans 'List Pages'} +{if !$user.isAnonymous()} | {trans 'New Page'} {/if} +{if !$user.isAnonymous() and $inPageView} | {trans 'Update This Page'} {/if} |
diff --git a/src/IDF/templates/idf/wiki/create.html b/src/IDF/templates/idf/wiki/create.html deleted file mode 100644 index 1b2975b..0000000 --- a/src/IDF/templates/idf/wiki/create.html +++ /dev/null @@ -1,68 +0,0 @@ -{extends "idf/wiki/base.html"} -{block docclass}yui-t1{assign $inCreate = true}{/block} -{block body} - -{if $preview} -

{trans 'Preview of the Page'}

- -{markdown $preview, $request} -{/if} - -{if $form.errors} -
-

{trans 'The form contains some errors. Please correct them to create the page.'}

-{if $form.get_top_errors} -{$form.render_top_errors|unsafe} -{/if} -
-{/if} - - - - - - - - - - - - - - -{if $isOwner or $isMember} - - - -{/if} - - - - -
{$form.f.title.labelTag}:{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if} -{$form.f.title|unsafe}
-{$form.f.title.help_text} -
{$form.f.summary.labelTag}:{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} -{$form.f.summary|unsafe}
-{$form.f.summary.help_text} -
{$form.f.content.labelTag}:{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} -{$form.f.content|unsafe} -
{$form.f.label1.labelTag}: -{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe} -{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe} -{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe} -
    | {trans 'Cancel'} -
-
-{/block} -{block context} -
-{include 'idf/wiki/edit-info.html'} -
-{/block} -{block javascript} - -{include 'idf/wiki/js-autocomplete.html'}{/block} - diff --git a/src/IDF/templates/idf/wiki/createPage.html b/src/IDF/templates/idf/wiki/createPage.html new file mode 100644 index 0000000..e54ee5f --- /dev/null +++ b/src/IDF/templates/idf/wiki/createPage.html @@ -0,0 +1,68 @@ +{extends "idf/wiki/base.html"} +{block docclass}yui-t1{assign $inCreate = true}{/block} +{block body} + +{if $preview} +

{trans 'Preview of the Page'}

+ +{markdown $preview, $request} +{/if} + +{if $form.errors} +
+

{trans 'The form contains some errors. Please correct them to create the page.'}

+{if $form.get_top_errors} +{$form.render_top_errors|unsafe} +{/if} +
+{/if} + +
+ + + + + + + + + + + + +{if $isOwner or $isMember} + + + +{/if} + + + + +
{$form.f.title.labelTag}:{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if} +{$form.f.title|unsafe}
+{$form.f.title.help_text} +
{$form.f.summary.labelTag}:{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} +{$form.f.summary|unsafe}
+{$form.f.summary.help_text} +
{$form.f.content.labelTag}:{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} +{$form.f.content|unsafe} +
{$form.f.label1.labelTag}: +{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe} +{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe} +{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe} +
    | {trans 'Cancel'} +
+
+{/block} +{block context} +
+{include 'idf/wiki/edit-info.html'} +
+{/block} +{block javascript} + +{include 'idf/wiki/js-autocomplete.html'}{/block} + diff --git a/src/IDF/templates/idf/wiki/delete.html b/src/IDF/templates/idf/wiki/delete.html deleted file mode 100644 index 813f088..0000000 --- a/src/IDF/templates/idf/wiki/delete.html +++ /dev/null @@ -1,46 +0,0 @@ -{extends "idf/wiki/base.html"} -{block extraheader}{if $oldrev}{/if}{/block} -{block docclass}yui-t3{assign $inView=true}{/block} -{block body} - -{assign $submitter = $oldrev.get_submitter()}{aurl 'url', 'IDF_Views_Wiki::view', array($project.shortname, $page.title)} -
-

{blocktrans}You are looking at an old revision ({$oldrev.summary}) of the page -{$page.title}. This revision was created -by {$submitter}.{/blocktrans}

-
-

{blocktrans}If you delete this old revision, it will be removed from the database and you will not be able to recover it.{/blocktrans}

-
- - - - - -
  | {trans 'Cancel'} -
-
- -

{$page.summary}

- -{markdown $oldrev.content, $request} - -{/block} -{block context} -{assign $submitter = $page.get_submitter()} -

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

-{if $rev.creation_dtime != $page.creation_dtime}

{assign $submitter = $rev.get_submitter()} -{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} -{if $tags.count()} -

-{trans 'Labels:'}
-{foreach $tags as $tag} -{$tag.class}:{$tag.name}
-{/foreach} -

{/if} -{if $revs.count() > 0} -

{trans 'Old Revisions'}

- -{/if} -{/block} diff --git a/src/IDF/templates/idf/wiki/deletePage.html b/src/IDF/templates/idf/wiki/deletePage.html new file mode 100644 index 0000000..acc21aa --- /dev/null +++ b/src/IDF/templates/idf/wiki/deletePage.html @@ -0,0 +1,42 @@ +{extends "idf/wiki/base.html"} +{block docclass}yui-t3{assign $inPageView=true}{/block} +{block body} + +

{blocktrans}If you delete this documentation page, it will be removed from the database with all the associated revisions and you will not be able to recover it.{/blocktrans}

+
+ + + + + +
  +{$form.f.confirm|unsafe} {$form.f.confirm.labelTag}
+{if $form.f.confirm.errors}{$form.f.confirm.fieldErrors}{/if} + | {trans 'Cancel'} +
+
+ +

{$page.summary}

+ +{markdown $rev.content, $request} + +{/block} +{block context} +{assign $submitter = $page.get_submitter()} +

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

+{if $rev.creation_dtime != $page.creation_dtime}

{assign $submitter = $rev.get_submitter()} +{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} +{if $tags.count()} +

+{trans 'Labels:'}
+{foreach $tags as $tag} +{$tag.class}:{$tag.name}
+{/foreach} +

{/if} +{if $revs.count() > 0} +

{trans 'Old Revisions'}

+ +{/if} +{/block} diff --git a/src/IDF/templates/idf/wiki/deletePageRev.html b/src/IDF/templates/idf/wiki/deletePageRev.html new file mode 100644 index 0000000..1969118 --- /dev/null +++ b/src/IDF/templates/idf/wiki/deletePageRev.html @@ -0,0 +1,46 @@ +{extends "idf/wiki/base.html"} +{block extraheader}{if $oldrev}{/if}{/block} +{block docclass}yui-t3{assign $inPageView=true}{/block} +{block body} + +{assign $submitter = $oldrev.get_submitter()}{aurl 'url', 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)} +
+

{blocktrans}You are looking at an old revision ({$oldrev.summary}) of the page +{$page.title}. This revision was created +by {$submitter}.{/blocktrans}

+
+

{blocktrans}If you delete this old revision, it will be removed from the database and you will not be able to recover it.{/blocktrans}

+
+ + + + + +
  | {trans 'Cancel'} +
+
+ +

{$page.summary}

+ +{markdown $oldrev.content, $request} + +{/block} +{block context} +{assign $submitter = $page.get_submitter()} +

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

+{if $rev.creation_dtime != $page.creation_dtime}

{assign $submitter = $rev.get_submitter()} +{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} +{if $tags.count()} +

+{trans 'Labels:'}
+{foreach $tags as $tag} +{$tag.class}:{$tag.name}
+{/foreach} +

{/if} +{if $revs.count() > 0} +

{trans 'Old Revisions'}

+ +{/if} +{/block} diff --git a/src/IDF/templates/idf/wiki/deletepage.html b/src/IDF/templates/idf/wiki/deletepage.html deleted file mode 100644 index 57c99e6..0000000 --- a/src/IDF/templates/idf/wiki/deletepage.html +++ /dev/null @@ -1,42 +0,0 @@ -{extends "idf/wiki/base.html"} -{block docclass}yui-t3{assign $inView=true}{/block} -{block body} - -

{blocktrans}If you delete this documentation page, it will be removed from the database with all the associated revisions and you will not be able to recover it.{/blocktrans}

-
- - - - - -
  -{$form.f.confirm|unsafe} {$form.f.confirm.labelTag}
-{if $form.f.confirm.errors}{$form.f.confirm.fieldErrors}{/if} - | {trans 'Cancel'} -
-
- -

{$page.summary}

- -{markdown $rev.content, $request} - -{/block} -{block context} -{assign $submitter = $page.get_submitter()} -

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

-{if $rev.creation_dtime != $page.creation_dtime}

{assign $submitter = $rev.get_submitter()} -{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} -{if $tags.count()} -

-{trans 'Labels:'}
-{foreach $tags as $tag} -{$tag.class}:{$tag.name}
-{/foreach} -

{/if} -{if $revs.count() > 0} -

{trans 'Old Revisions'}

- -{/if} -{/block} diff --git a/src/IDF/templates/idf/wiki/index.html b/src/IDF/templates/idf/wiki/index.html deleted file mode 100644 index 945dd87..0000000 --- a/src/IDF/templates/idf/wiki/index.html +++ /dev/null @@ -1,20 +0,0 @@ -{extends "idf/wiki/base.html"} -{block docclass}yui-t1{assign $inWiki=true}{/block} -{block body} -{$pages.render} -{if !$user.isAnonymous()} -{aurl 'url', 'IDF_Views_Wiki::create', array($project.shortname)} -

+ {trans 'New Page'}

{/if} - -{/block} -{block context} -

{trans 'Number of pages:'} {$pages.nb_items}

-{assign $cloud_url = 'IDF_Views_Wiki::listLabel'} -{assign $cloud = 'wiki'} -{include 'idf/tags-cloud.html'} -{if $deprecated > 0} -{aurl 'url', 'IDF_Views_Wiki::listLabel', array($project.shortname, $dlabel.id)} -

{blocktrans}See the deprecated pages.{/blocktrans}

-{/if} -{/block} - diff --git a/src/IDF/templates/idf/wiki/listPages.html b/src/IDF/templates/idf/wiki/listPages.html new file mode 100644 index 0000000..8473148 --- /dev/null +++ b/src/IDF/templates/idf/wiki/listPages.html @@ -0,0 +1,20 @@ +{extends "idf/wiki/base.html"} +{block docclass}yui-t1{assign $inPageList=true}{/block} +{block body} +{$pages.render} +{if !$user.isAnonymous()} +{aurl 'url', 'IDF_Views_Wiki::createPage', array($project.shortname)} +

+ {trans 'New Page'}

{/if} + +{/block} +{block context} +

{trans 'Number of pages:'} {$pages.nb_items}

+{assign $cloud_url = 'IDF_Views_Wiki::listPagesWithLabel'} +{assign $cloud = 'wiki'} +{include 'idf/tags-cloud.html'} +{if $deprecated > 0} +{aurl 'url', 'IDF_Views_Wiki::listPagesWithLabel', array($project.shortname, $dlabel.id)} +

{blocktrans}See the deprecated pages.{/blocktrans}

+{/if} +{/block} + diff --git a/src/IDF/templates/idf/wiki/search.html b/src/IDF/templates/idf/wiki/search.html index 08edbe3..bc4b468 100644 --- a/src/IDF/templates/idf/wiki/search.html +++ b/src/IDF/templates/idf/wiki/search.html @@ -3,7 +3,7 @@ {block body} {$pages.render} {if !$user.isAnonymous()} -{aurl 'url', 'IDF_Views_Wiki::create', array($project.shortname)} +{aurl 'url', 'IDF_Views_Wiki::createPage', array($project.shortname)}

+ {trans 'New Page'}

{/if} {/block} diff --git a/src/IDF/templates/idf/wiki/update.html b/src/IDF/templates/idf/wiki/update.html deleted file mode 100644 index b489447..0000000 --- a/src/IDF/templates/idf/wiki/update.html +++ /dev/null @@ -1,75 +0,0 @@ -{extends "idf/wiki/base.html"} -{block docclass}yui-t2{/block} -{block body} - -{if $preview} -

{trans 'Preview of the Page'}

- -{markdown $preview, $request} -{/if} - -{if $form.errors} -
-

{trans 'The form contains some errors. Please correct them to update the page.'}

-{if $form.get_top_errors} -{$form.render_top_errors|unsafe} -{/if} -
-{/if} - -
-{if $isOwner or $isMember} - - - - - - - -{/if} - - - - - - - -{if $isOwner or $isMember} - - - -{/if} - - - - -
{$form.f.title.labelTag}:{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if} -{$form.f.title|unsafe}
-{$form.f.title.help_text} -
{$form.f.summary.labelTag}:{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} -{$form.f.summary|unsafe}
-{$form.f.summary.help_text} -
{$form.f.content.labelTag}:{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} -{$form.f.content|unsafe} -
{$form.f.comment.labelTag}:{if $form.f.comment.errors}{$form.f.comment.fieldErrors}{/if} -{$form.f.comment|unsafe}
-{$form.f.comment.help_text} -
{$form.f.label1.labelTag}: -{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe} -{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe} -{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe} -
 {* float left is a fix for Firefox < 3.5 *} -   | {trans 'Cancel'}{if $isOwner or $isAdmin or $isMember} -{aurl 'url', 'IDF_Views_Wiki::delete', array($project.shortname, $page.id)} -{trans 'Trash'} {trans 'Delete this page'}{/if} -
-
-{/block} -{block context} -
-{include 'idf/wiki/edit-info.html'} -
-{/block} -{block javascript} -{include 'idf/wiki/js-autocomplete.html'}{/block} - diff --git a/src/IDF/templates/idf/wiki/updatePage.html b/src/IDF/templates/idf/wiki/updatePage.html new file mode 100644 index 0000000..0533a7a --- /dev/null +++ b/src/IDF/templates/idf/wiki/updatePage.html @@ -0,0 +1,75 @@ +{extends "idf/wiki/base.html"} +{block docclass}yui-t2{/block} +{block body} + +{if $preview} +

{trans 'Preview of the Page'}

+ +{markdown $preview, $request} +{/if} + +{if $form.errors} +
+

{trans 'The form contains some errors. Please correct them to update the page.'}

+{if $form.get_top_errors} +{$form.render_top_errors|unsafe} +{/if} +
+{/if} + +
+{if $isOwner or $isMember} + + + + + + + +{/if} + + + + + + + +{if $isOwner or $isMember} + + + +{/if} + + + + +
{$form.f.title.labelTag}:{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if} +{$form.f.title|unsafe}
+{$form.f.title.help_text} +
{$form.f.summary.labelTag}:{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} +{$form.f.summary|unsafe}
+{$form.f.summary.help_text} +
{$form.f.content.labelTag}:{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} +{$form.f.content|unsafe} +
{$form.f.comment.labelTag}:{if $form.f.comment.errors}{$form.f.comment.fieldErrors}{/if} +{$form.f.comment|unsafe}
+{$form.f.comment.help_text} +
{$form.f.label1.labelTag}: +{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe} +{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe} +{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe} +
 {* float left is a fix for Firefox < 3.5 *} +   | {trans 'Cancel'}{if $isOwner or $isAdmin or $isMember} +{aurl 'url', 'IDF_Views_Wiki::deletePage', array($project.shortname, $page.id)} +{trans 'Trash'} {trans 'Delete this page'}{/if} +
+
+{/block} +{block context} +
+{include 'idf/wiki/edit-info.html'} +
+{/block} +{block javascript} +{include 'idf/wiki/js-autocomplete.html'}{/block} + diff --git a/src/IDF/templates/idf/wiki/view.html b/src/IDF/templates/idf/wiki/view.html deleted file mode 100644 index bacb131..0000000 --- a/src/IDF/templates/idf/wiki/view.html +++ /dev/null @@ -1,60 +0,0 @@ -{extends "idf/wiki/base.html"} - -{block extraheader} -{if $oldrev}{/if} - -{/block} - -{block docclass}yui-t3{assign $inView=true}{/block} - -{block body} -{if $deprecated}{* deprecated page *} -
-

{blocktrans}Attention! This page is marked as deprecated, -use it as reference only if you are sure you need these specific information.{/blocktrans}

-
-{/if} -{if $oldrev} -{ashowuser 'submitter', $oldrev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::view', array($project.shortname, $page.title)} -
-

{blocktrans}You are looking at an old revision of the page -{$page.title}. This revision was created -by {$submitter}.{/blocktrans}

-
-{/if} - -
-
{trans 'Table of Content'}
- -

{$page.summary}

- -{if !$oldrev} -{markdown $rev.content, $request} -{else} -{markdown $oldrev.content, $request} -{if $isOwner or $isAdmin}{aurl 'url', 'IDF_Views_Wiki::deleteRev', array($project.shortname, $oldrev.id)} -

{trans 'Trash'} {trans 'Delete this revision'}

-{/if} -{/if} - -
-{/block} -{block context} -{ashowuser 'submitter', $page.get_submitter(), $request} -

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

-{if $rev.creation_dtime != $page.creation_dtime}

{ashowuser 'submitter', $rev.get_submitter(), $request} -{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} -{if $tags.count()} -

-{trans 'Labels:'}
-{foreach $tags as $tag} -{$tag.class}:{$tag.name}
-{/foreach} -

{/if} -{if $revs.count() > 0} -

{trans 'Old Revisions'}

- -{/if} -{/block} diff --git a/src/IDF/templates/idf/wiki/viewPage.html b/src/IDF/templates/idf/wiki/viewPage.html new file mode 100644 index 0000000..203fdf2 --- /dev/null +++ b/src/IDF/templates/idf/wiki/viewPage.html @@ -0,0 +1,60 @@ +{extends "idf/wiki/base.html"} + +{block extraheader} +{if $oldrev}{/if} + +{/block} + +{block docclass}yui-t3{assign $inPageView=true}{/block} + +{block body} +{if $deprecated}{* deprecated page *} +
+

{blocktrans}Attention! This page is marked as deprecated, +use it as reference only if you are sure you need these specific information.{/blocktrans}

+
+{/if} +{if $oldrev} +{ashowuser 'submitter', $oldrev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)} +
+

{blocktrans}You are looking at an old revision of the page +{$page.title}. This revision was created +by {$submitter}.{/blocktrans}

+
+{/if} + +
+
{trans 'Table of Content'}
+ +

{$page.summary}

+ +{if !$oldrev} +{markdown $rev.content, $request} +{else} +{markdown $oldrev.content, $request} +{if $isOwner or $isAdmin}{aurl 'url', 'IDF_Views_Wiki::deletePageRev', array($project.shortname, $oldrev.id)} +

{trans 'Trash'} {trans 'Delete this revision'}

+{/if} +{/if} + +
+{/block} +{block context} +{ashowuser 'submitter', $page.get_submitter(), $request} +

{trans 'Created:'} {$page.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

+{if $rev.creation_dtime != $page.creation_dtime}

{ashowuser 'submitter', $rev.get_submitter(), $request} +{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} +{if $tags.count()} +

+{trans 'Labels:'}
+{foreach $tags as $tag} +{$tag.class}:{$tag.name}
+{/foreach} +

{/if} +{if $revs.count() > 0} +

{trans 'Old Revisions'}

+ +{/if} +{/block}