Initial commit
This commit is contained in:
23
indefero/src/IDF/templates/idf/wiki/base.html
Normal file
23
indefero/src/IDF/templates/idf/wiki/base.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{extends "idf/base.html"}
|
||||
{block tabwiki} class="active"{/block}
|
||||
{block subtabs}
|
||||
<div id="sub-tabs">
|
||||
<a {if $inPageList}class="active" {/if}href="{url 'IDF_Views_Wiki::listPages', array($project.shortname)}">{trans 'List Pages'}</a>
|
||||
{if !$user.isAnonymous()}
|
||||
| <a {if $inResourceList}class="active" {/if}href="{url 'IDF_Views_Wiki::listResources', array($project.shortname)}">{trans 'List Resources'}</a>
|
||||
| <a {if $inCreatePage}class="active" {/if}href="{url 'IDF_Views_Wiki::createPage', array($project.shortname)}">{trans 'New Page'}</a>
|
||||
| <a {if $inCreateResource}class="active" {/if}href="{url 'IDF_Views_Wiki::createResource', array($project.shortname)}">{trans 'New Resource'}</a>
|
||||
{if $inPageView}
|
||||
| <a href="{url 'IDF_Views_Wiki::updatePage', array($project.shortname, $page.title)}">{trans 'Update This Page'}</a>
|
||||
{/if}
|
||||
{if $inResourceView}
|
||||
| <a href="{url 'IDF_Views_Wiki::updateResource', array($project.shortname, $resource.title)}">{trans 'Update This Resource'}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
| <form class="star" action="{url 'IDF_Views_Wiki::search', array($project.shortname)}" method="get">
|
||||
<input accesskey="4" type="text" value="{$q}" name="q" size="20" />
|
||||
<input type="submit" name="s" value="{trans 'Search'}" />
|
||||
</form>
|
||||
{superblock}
|
||||
</div>
|
||||
{/block}
|
68
indefero/src/IDF/templates/idf/wiki/createPage.html
Normal file
68
indefero/src/IDF/templates/idf/wiki/createPage.html
Normal file
@@ -0,0 +1,68 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t2{assign $inCreatePage = true}{/block}
|
||||
{block body}
|
||||
|
||||
{if $preview}
|
||||
<h2 id="preview" class="top">{trans 'Preview of the Page'}</h2>
|
||||
|
||||
{markdown $preview, $request}
|
||||
{/if}
|
||||
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'The form contains some errors. Please correct them to create the page.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="." >
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th><strong>{$form.f.title.labelTag}:</strong></th>
|
||||
<td>{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if}
|
||||
{$form.f.title|unsafe}<br />
|
||||
<span class="helptext">{$form.f.title.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.summary.labelTag}:</strong></th>
|
||||
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
|
||||
{$form.f.summary|unsafe}<br />
|
||||
<span class="helptext">{$form.f.summary.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.content.labelTag}:</strong></th>
|
||||
<td>{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if}
|
||||
{$form.f.content|unsafe}
|
||||
</td>
|
||||
</tr>{if $isOwner or $isMember}
|
||||
<tr>
|
||||
<th>{$form.f.label1.labelTag}:</th>
|
||||
<td>
|
||||
{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}
|
||||
</td>
|
||||
</tr>{/if}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Preview'}" name="preview" /> <input type="submit" value="{trans 'Create Page'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::listPages', array($project.shortname)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
{include 'idf/wiki/edit-info.html'}
|
||||
</div>
|
||||
{/block}
|
||||
{block javascript}
|
||||
<script type="text/javascript">
|
||||
document.getElementById('id_title').focus()
|
||||
</script>
|
||||
{include 'idf/wiki/js-autocomplete.html'}{/block}
|
||||
|
56
indefero/src/IDF/templates/idf/wiki/createResource.html
Normal file
56
indefero/src/IDF/templates/idf/wiki/createResource.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t1{assign $inCreateResource = true}{/block}
|
||||
{block body}
|
||||
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'The form contains some errors. Please correct them to create the page.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="." >
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th><strong>{$form.f.title.labelTag}:</strong></th>
|
||||
<td>{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if}
|
||||
{$form.f.title|unsafe}<br />
|
||||
<span class="helptext">{$form.f.title.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.summary.labelTag}:</strong></th>
|
||||
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
|
||||
{$form.f.summary|unsafe}<br />
|
||||
<span class="helptext">{$form.f.summary.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.file.labelTag}:</strong></th>
|
||||
<td>{if $form.f.file.errors}{$form.f.file.fieldErrors}{/if}
|
||||
{$form.f.file|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Create Resource'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::listResources', array($project.shortname)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
{blocktrans}
|
||||
Wiki resources are later addressed in wiki pages by their title, so ensure that you
|
||||
give your resource a unique and an easy to remember name.
|
||||
{/blocktrans}
|
||||
</div>
|
||||
{/block}
|
||||
{block javascript}
|
||||
<script type="text/javascript">
|
||||
document.getElementById('id_title').focus()
|
||||
</script>
|
||||
{/block}
|
||||
|
42
indefero/src/IDF/templates/idf/wiki/deletePage.html
Normal file
42
indefero/src/IDF/templates/idf/wiki/deletePage.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t3{assign $inPageView=true}{/block}
|
||||
{block body}
|
||||
|
||||
<p>{blocktrans}If you delete this documentation page, it will be removed from the database with all the associated revisions and <strong>you will not be able to recover it</strong>.{/blocktrans}</p>
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
{$form.f.confirm|unsafe} <strong>{$form.f.confirm.labelTag}</strong><br />
|
||||
{if $form.f.confirm.errors}{$form.f.confirm.fieldErrors}{/if}
|
||||
<input type="submit" value="{trans 'Delete Page'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{markdown $rev.content, $request}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
{assign $submitter = $page.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$page.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $page.creation_dtime}<p>{assign $submitter = $rev.get_submitter()}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $tags.count()}
|
||||
<p>
|
||||
<strong>{trans 'Labels:'}</strong><br />
|
||||
{foreach $tags as $tag}
|
||||
<span class="label"><strong>{$tag.class}:</strong>{$tag.name}</span><br />
|
||||
{/foreach}
|
||||
</p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
46
indefero/src/IDF/templates/idf/wiki/deletePageRev.html
Normal file
46
indefero/src/IDF/templates/idf/wiki/deletePageRev.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block extraheader}{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/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)}
|
||||
<div class="old-rev">
|
||||
<p>{blocktrans}You are looking at an old revision (<em>{$oldrev.summary}</em>) of the page
|
||||
<a href="{$url}">{$page.title}</a>. This revision was created
|
||||
by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
<p>{blocktrans}If you delete this old revision, it will be removed from the database and <strong>you will not be able to recover it</strong>.{/blocktrans}</p>
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Delete Revision'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{markdown $oldrev.content, $request}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
{assign $submitter = $page.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$page.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $page.creation_dtime}<p>{assign $submitter = $rev.get_submitter()}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $tags.count()}
|
||||
<p>
|
||||
<strong>{trans 'Labels:'}</strong><br />
|
||||
{foreach $tags as $tag}
|
||||
<span class="label"><strong>{$tag.class}:</strong>{$tag.name}</span><br />
|
||||
{/foreach}
|
||||
</p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
47
indefero/src/IDF/templates/idf/wiki/deleteResource.html
Normal file
47
indefero/src/IDF/templates/idf/wiki/deleteResource.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t3{assign $inResourceView=true}{/block}
|
||||
{block body}
|
||||
|
||||
<p>{blocktrans}If you delete this documentation resource, it will be removed from the database with all the associated revisions
|
||||
and <strong>you will not be able to recover it</strong>. Any documentation pages that reference this resource,
|
||||
will no longer be able to render it, but won't be deleted.{/blocktrans}</p>
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
{$form.f.confirm|unsafe} <strong>{$form.f.confirm.labelTag}</strong><br />
|
||||
{if $form.f.confirm.errors}{$form.f.confirm.fieldErrors}{/if}
|
||||
<input type="submit" value="{trans 'Delete Resource'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p class="desc">{$resource.summary}</p>
|
||||
|
||||
{assign $preview = $rev.renderRaw()}
|
||||
{if $preview == ''}
|
||||
{assign $preview = __('Unable to render preview for this MIME type.')}
|
||||
{/if}
|
||||
<p class="preview">{$preview|unsafe}</p>
|
||||
|
||||
<ul>
|
||||
<li>{trans 'File size'}: {$rev.filesize|size}</li>
|
||||
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
||||
<li><a href="{$rev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
</ul>
|
||||
{/block}
|
||||
|
||||
{block context}
|
||||
{assign $submitter = $resource.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$resource.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $rev.get_submitter()}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
49
indefero/src/IDF/templates/idf/wiki/deleteResourceRev.html
Normal file
49
indefero/src/IDF/templates/idf/wiki/deleteResourceRev.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block extraheader}{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/if}{/block}
|
||||
{block docclass}yui-t3{assign $inResourceView=true}{/block}
|
||||
{block body}
|
||||
|
||||
{assign $submitter = $oldrev.get_submitter()}{aurl 'url', 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title)}
|
||||
<div class="old-rev">
|
||||
<p>{blocktrans}You are looking at an old revision (<em>{$oldrev.summary}</em>) of the resource
|
||||
<a href="{$url}">{$resource.title}</a>. This revision was created by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
<p>{blocktrans}If you delete this old revision, it will be removed from the database and <strong>you will not be able to recover it</strong>.{/blocktrans}</p>
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Delete Revision'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title)}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p class="desc">{$resource.summary}</p>
|
||||
|
||||
{assign $preview = $oldrev.renderRaw()}
|
||||
{if $preview == ''}
|
||||
{assign $preview = __('Unable to render preview for this MIME type.')}
|
||||
{/if}
|
||||
<p class="preview">{$preview|unsafe}</p>
|
||||
|
||||
<ul>
|
||||
<li>{trans 'File size'}: {$oldrev.filesize|size}</li>
|
||||
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
||||
<li><a href="{$oldrev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
</ul>
|
||||
{/block}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
{assign $submitter = $resource.get_submitter()}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$resource.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $oldrev.creation_dtime != $resource.creation_dtime}<p>{assign $submitter = $oldrev.get_submitter()}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$oldrev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
10
indefero/src/IDF/templates/idf/wiki/edit-info.html
Normal file
10
indefero/src/IDF/templates/idf/wiki/edit-info.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{assign $eurl = 'http://michelf.com/projects/php-markdown/extra/'}
|
||||
{assign $burl = 'http://daringfireball.net/projects/markdown/syntax'}
|
||||
{aurl 'furl', 'IDF_Views::faq'}
|
||||
{blocktrans}
|
||||
<p><strong>Instructions:</strong></p>
|
||||
<p>The content of the page can use the <a href="{$burl}">Markdown syntax</a> with the <a href="{$eurl}"><em>Extra</em> extension</a>.</p>
|
||||
<p>Website addresses are automatically linked and you can link to another page in the documentation using double square brackets like that <code>[[AnotherPage]]</code>.</p>
|
||||
<p>If you want to embed uploaded resources, use the <code>[[!ResourceName]]</code> syntax for that. This is described more in detail <a href="{$furl}#q-wiki">in the FAQ.</a></p>
|
||||
<p>To directly include a file content from the repository, embrace its path with triple square brackets: <code>[[[my/file.txt]]]</code>.</p>
|
||||
{/blocktrans}
|
11
indefero/src/IDF/templates/idf/wiki/feedfragment-page.xml
Normal file
11
indefero/src/IDF/templates/idf/wiki/feedfragment-page.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<entry>
|
||||
<title>{$title}</title>
|
||||
<link href="{$url}"/>
|
||||
<id>{$url}:{$rev.id}</id>
|
||||
<updated>{$date}</updated>
|
||||
<author>{$rev.get_submitter()}</author>
|
||||
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
|
||||
{if !$create}<p><strong>{trans 'Changes:'}</strong> {$rev.summary}:</p>{/if}
|
||||
{markdown $rev.content, $request}
|
||||
</div></content>
|
||||
</entry>
|
@@ -0,0 +1,11 @@
|
||||
<entry>
|
||||
<title>{$title}</title>
|
||||
<link href="{$url}"/>
|
||||
<id>{$url}:{$rev.id}</id>
|
||||
<updated>{$date}</updated>
|
||||
<author>{$rev.get_submitter()}</author>
|
||||
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
|
||||
{if !$create}<p><strong>{trans 'Changes:'}</strong> {$rev.summary}</p>
|
||||
{else}{trans 'Initial creation'}{/if}
|
||||
</div></content>
|
||||
</entry>
|
27
indefero/src/IDF/templates/idf/wiki/js-autocomplete.html
Normal file
27
indefero/src/IDF/templates/idf/wiki/js-autocomplete.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{if $isOwner or $isMember}
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery.bgiframe.min.js'}"></script>
|
||||
<script type="text/javascript" src="{media '/idf/js/jquery.autocomplete.min.js'}"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// <!-- {literal}
|
||||
$(document).ready(function(){
|
||||
var auto_labels = [{/literal}{$auto_labels|safe}{literal}];
|
||||
var j=0;
|
||||
for (j=1;j<4;j=j+1) {
|
||||
$("#id_label"+j).autocomplete(auto_labels, {
|
||||
minChars: 0,
|
||||
width: 310,
|
||||
matchContains: true,
|
||||
max: 50,
|
||||
highlightItem: false,
|
||||
formatItem: function(row, i, max, term) {
|
||||
return row.to.replace(new RegExp("(" + term + ")", "gi"), "<strong>$1</strong>") + " <span style='font-size: 80%;'>" + row.name + "</span>";
|
||||
},
|
||||
formatResult: function(row) {
|
||||
return row.to;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
{/literal} //-->
|
||||
</script>
|
||||
{/if}
|
20
indefero/src/IDF/templates/idf/wiki/listPages.html
Normal file
20
indefero/src/IDF/templates/idf/wiki/listPages.html
Normal file
@@ -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)}
|
||||
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Page'}</a></p>{/if}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
<p><strong>{trans 'Number of pages:'}</strong> {$pages.nb_items}</p>
|
||||
{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)}
|
||||
<p class="helptext">{blocktrans}See <a href="{$url}">the deprecated pages</a>.{/blocktrans}</p>
|
||||
{/if}
|
||||
{/block}
|
||||
|
12
indefero/src/IDF/templates/idf/wiki/listResources.html
Normal file
12
indefero/src/IDF/templates/idf/wiki/listResources.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t1{assign $inResourceList=true}{/block}
|
||||
{block body}
|
||||
{$resources.render}
|
||||
{aurl 'url', 'IDF_Views_Wiki::createResource', array($project.shortname)}
|
||||
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Resource'}</a></p>
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
<p><strong>{trans 'Number of resources:'}</strong> {$resources.nb_items}</p>
|
||||
{/block}
|
||||
|
13
indefero/src/IDF/templates/idf/wiki/search.html
Normal file
13
indefero/src/IDF/templates/idf/wiki/search.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{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::createPage', array($project.shortname)}
|
||||
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Page'}</a></p>{/if}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
<p><strong>{trans 'Pages found:'}</strong> {$pages.nb_items}</p>
|
||||
{/block}
|
||||
|
75
indefero/src/IDF/templates/idf/wiki/updatePage.html
Normal file
75
indefero/src/IDF/templates/idf/wiki/updatePage.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t2{/block}
|
||||
{block body}
|
||||
|
||||
{if $preview}
|
||||
<h2 id="preview" class="top">{trans 'Preview of the Page'}</h2>
|
||||
|
||||
{markdown $preview, $request}
|
||||
{/if}
|
||||
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'The form contains some errors. Please correct them to update the page.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="." >
|
||||
<table class="form" summary="">{if $isOwner or $isMember}
|
||||
<tr>
|
||||
<th><strong>{$form.f.title.labelTag}:</strong></th>
|
||||
<td>{if $form.f.title.errors}{$form.f.title.fieldErrors}{/if}
|
||||
{$form.f.title|unsafe}<br />
|
||||
<span class="helptext">{$form.f.title.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.summary.labelTag}:</strong></th>
|
||||
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
|
||||
{$form.f.summary|unsafe}<br />
|
||||
<span class="helptext">{$form.f.summary.help_text}</span>
|
||||
</td>
|
||||
</tr>{/if}
|
||||
<tr>
|
||||
<th><strong>{$form.f.content.labelTag}:</strong></th>
|
||||
<td>{if $form.f.content.errors}{$form.f.content.fieldErrors}{/if}
|
||||
{$form.f.content|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.comment.labelTag}:</strong></th>
|
||||
<td>{if $form.f.comment.errors}{$form.f.comment.fieldErrors}{/if}
|
||||
{$form.f.comment|unsafe}<br />
|
||||
<span class="helptext">{$form.f.comment.help_text}</span>
|
||||
</td>
|
||||
</tr>{if $isOwner or $isMember}
|
||||
<tr>
|
||||
<th>{$form.f.label1.labelTag}:</th>
|
||||
<td>
|
||||
{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}
|
||||
</td>
|
||||
</tr>{/if}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>{* float left is a fix for Firefox < 3.5 *}
|
||||
<span style="float: left;"><input type="submit" value="{trans 'Preview'}" name="preview" /> <input type="submit" value="{trans 'Update Page'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}">{trans 'Cancel'}</a></span>{if $isOwner or $isAdmin or $isMember}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deletePage', array($project.shortname, $page.id)}
|
||||
<span class="dellink"><a href="{$url}" title="{trans 'Delete this page'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}" title="{trans 'Delete this page'}">{trans 'Delete this page'}</a></span>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
{include 'idf/wiki/edit-info.html'}
|
||||
</div>
|
||||
{/block}
|
||||
{block javascript}
|
||||
{include 'idf/wiki/js-autocomplete.html'}{/block}
|
||||
|
46
indefero/src/IDF/templates/idf/wiki/updateResource.html
Normal file
46
indefero/src/IDF/templates/idf/wiki/updateResource.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
{block docclass}yui-t2{/block}
|
||||
{block body}
|
||||
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'The form contains some errors. Please correct them to update the page.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" action="." >
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<th><strong>{$form.f.summary.labelTag}:</strong></th>
|
||||
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
|
||||
{$form.f.summary|unsafe}<br />
|
||||
<span class="helptext">{$form.f.summary.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.file.labelTag}:</strong></th>
|
||||
<td>{if $form.f.file.errors}{$form.f.file.fieldErrors}{/if}
|
||||
{$form.f.file|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.comment.labelTag}:</strong></th>
|
||||
<td>{if $form.f.comment.errors}{$form.f.comment.fieldErrors}{/if}
|
||||
{$form.f.comment|unsafe}<br />
|
||||
<span class="helptext">{$form.f.comment.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>{* float left is a fix for Firefox < 3.5 *}
|
||||
<span style="float: left;"> <input type="submit" value="{trans 'Update Resource'}" name="submit" /> | <a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title)}">{trans 'Cancel'}</a></span>{if $isOwner or $isAdmin or $isMember}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deleteResource', array($project.shortname, $resource.id)}
|
||||
<span class="dellink"><a href="{$url}" title="{trans 'Delete this resource'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}" title="{trans 'Delete this resource'}">{trans 'Delete this resource'}</a></span>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
58
indefero/src/IDF/templates/idf/wiki/viewPage.html
Normal file
58
indefero/src/IDF/templates/idf/wiki/viewPage.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
|
||||
{block extraheader}
|
||||
{if !$rev.is_head}<meta name="ROBOTS" content="NOINDEX" />{/if}
|
||||
<link rel="stylesheet" type="text/css" media="print" href="{media '/idf/css/print-wiki.css'}" />
|
||||
{/block}
|
||||
|
||||
{block docclass}yui-t3{assign $inPageView=true}{/block}
|
||||
|
||||
{block body}
|
||||
{if $deprecated}{* deprecated page *}
|
||||
<div class="deprecated-page">
|
||||
<p>{blocktrans}<strong>Attention!</strong> This page is marked as deprecated,
|
||||
use it as reference only if you are sure you need these specific information.{/blocktrans}</p>
|
||||
</div>
|
||||
{/if}
|
||||
{if !$rev.is_head}
|
||||
{ashowuser 'submitter', $rev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}
|
||||
<div class="old-rev">
|
||||
<p>{blocktrans}You are looking at an old revision of the page
|
||||
<a href="{$url}">{$page.title}</a>. This revision was created
|
||||
by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div id="wiki-content">
|
||||
<div id="wiki-toc"><span id="contentheader">{trans 'Table of Content'}</span><div id="wiki-toc-content"></div></div>
|
||||
<script type="text/javascript" src="{media '/idf/js/wiki-toc.js'}"></script>
|
||||
<p class="desc">{$page.summary}</p>
|
||||
|
||||
{markdown $rev.content, $request}
|
||||
|
||||
{if !$rev.is_head and ($isOwner or $isAdmin)}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deletePageRev', array($project.shortname, $rev.id)}
|
||||
<p class="delp"><a href="{$url}" title="{trans 'Delete this revision'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}">{trans 'Delete this revision'}</a></p>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
{block context}
|
||||
{ashowuser 'submitter', $page.get_submitter(), $request}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$page.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $page.creation_dtime}<p>{ashowuser 'submitter', $rev.get_submitter(), $request}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $tags.count()}
|
||||
<p>
|
||||
<strong>{trans 'Labels:'}</strong><br />
|
||||
{foreach $tags as $tag}
|
||||
<span class="label"><strong>{$tag.class}:</strong>{$tag.name}</span><br />
|
||||
{/foreach}
|
||||
</p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
62
indefero/src/IDF/templates/idf/wiki/viewResource.html
Normal file
62
indefero/src/IDF/templates/idf/wiki/viewResource.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{extends "idf/wiki/base.html"}
|
||||
|
||||
{block extraheader}
|
||||
{if !$rev.is_head}<meta name="ROBOTS" content="NOINDEX" />{/if}
|
||||
{/block}
|
||||
|
||||
{block docclass}yui-t3{assign $inResourceView=true}{/block}
|
||||
|
||||
{block body}
|
||||
{if !$rev.is_head}
|
||||
{ashowuser 'submitter', $rev.get_submitter(), $request}{aurl 'url', 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title)}
|
||||
<div class="old-rev">
|
||||
<p>{blocktrans}You are looking at an old revision of the resource
|
||||
<a href="{$url}">{$resource.title}</a>. This revision was created
|
||||
by {$submitter}.{/blocktrans}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div id="wiki-resource">
|
||||
<p class="desc">{$resource.summary}</p>
|
||||
|
||||
{assign $preview = $rev.renderRaw()}
|
||||
{if $preview == ''}
|
||||
{assign $preview = __('Unable to render preview for this MIME type.')}
|
||||
{/if}
|
||||
<p class="preview">{$preview|unsafe}</p>
|
||||
|
||||
<ul>
|
||||
<li>{trans 'File size'}: {$rev.filesize|size}</li>
|
||||
<li>{trans 'MIME type'}: {$resource.mime_type}</li>
|
||||
<li><a href="{$rev.getRawURL(true)}">{trans 'Download this file'}</a></li>
|
||||
</ul>
|
||||
|
||||
{if !$rev.is_head and ($isOwner or $isAdmin)}
|
||||
{aurl 'url', 'IDF_Views_Wiki::deleteResourceRev', array($project.shortname, $rev.id)}
|
||||
<p class="delp"><a href="{$url}" title="{trans 'Delete this revision'}"><img src="{media '/idf/img/trash.png'}" style="vertical-align: text-bottom;" alt="{trans 'Trash'}" /></a> <a href="{$url}">{trans 'Delete this revision'}</a></p>
|
||||
{/if}
|
||||
|
||||
<p><strong>{trans 'Page Usage'}</strong></p>
|
||||
{if $pagerevs.count() == 0}
|
||||
<p>{trans 'This resource is not used on any pages yet.'}</p>
|
||||
{else}
|
||||
<ul>{foreach $pagerevs as $pagerev}
|
||||
{assign $css = ''}
|
||||
{if !$pagerev.is_head}{assign $css=' class="old-rev"'}{/if}
|
||||
<li{$css|unsafe}><a href="{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $pagerev.get_wikipage().title), array('rev'=>$pagerev.id)}">{$pagerev.get_wikipage().title} ({$pagerev.summary})</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
{block context}
|
||||
{ashowuser 'submitter', $resource.get_submitter(), $request}
|
||||
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$resource.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
|
||||
{if $rev.creation_dtime != $resource.creation_dtime}<p>{ashowuser 'submitter', $rev.get_submitter(), $request}
|
||||
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$rev.creation_dtime|dateago}</span><br /><span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>{/if}
|
||||
{if $revs.count() > 0}
|
||||
<p><strong>{trans 'Old Revisions'}</strong></p>
|
||||
<ul>{foreach $revs as $old}
|
||||
<li><a href="{url 'IDF_Views_Wiki::viewResource', array($project.shortname, $resource.title), array('rev'=>$old.id)}">{$old.summary}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
16
indefero/src/IDF/templates/idf/wiki/wiki-created-email.txt
Normal file
16
indefero/src/IDF/templates/idf/wiki/wiki-created-email.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
{trans 'Hello,'}
|
||||
|
||||
{blocktrans}A new documentation page has been created:{/blocktrans}
|
||||
|
||||
{$page.title|safe} - {$page.summary|safe}
|
||||
{trans 'Project:'} {$project.name|safe}
|
||||
{trans 'Created by:'} {$rev.get_submitter|safe}
|
||||
{assign $tags = $page.get_tags_list()}{if $tags.count()}{trans 'Labels:'}
|
||||
{foreach $tags as $tag} {$tag.class|safe}:{$tag.name|safe}
|
||||
{/foreach}{/if}
|
||||
{trans 'Content:'}
|
||||
|
||||
{$rev.content}
|
||||
|
||||
--
|
||||
{trans 'Documentation page:'} {$url_base}{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}
|
21
indefero/src/IDF/templates/idf/wiki/wiki-updated-email.txt
Normal file
21
indefero/src/IDF/templates/idf/wiki/wiki-updated-email.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
{trans 'Hello,'}
|
||||
|
||||
{blocktrans}The following documentation page has been updated:{/blocktrans}
|
||||
|
||||
{$page.title|safe} - {$page.summary|safe}
|
||||
{trans 'Project:'} {$project.name|safe}
|
||||
{trans 'Summary:'} {$rev.summary|safe}
|
||||
{trans 'Updated by:'} {$page.get_submitter|safe}
|
||||
{trans 'Created by:'} {$rev.get_submitter|safe}
|
||||
{assign $tags = $page.get_tags_list()}{if $tags.count()}{trans 'Labels:'}
|
||||
{foreach $tags as $tag} {$tag.class|safe}:{$tag.name|safe}
|
||||
{/foreach}{/if}{if $rev.changedRevision()}{trans 'Changes:'}
|
||||
{foreach $rev.changes as $w => $v}
|
||||
{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if} {if $w == 'lb'}{assign $l = implode(', ', $v)}{$l}{else}{$v}{/if}{/foreach}{/if}
|
||||
|
||||
{trans 'New content:'}
|
||||
|
||||
{$rev.content}
|
||||
|
||||
--
|
||||
{trans 'Documentation page:'} {$url_base}{url 'IDF_Views_Wiki::viewPage', array($project.shortname, $page.title)}
|
Reference in New Issue
Block a user