Skip to content

Commit

Permalink
Add Thesisannouncements feature
Browse files Browse the repository at this point in the history
  • Loading branch information
white-gecko committed Feb 10, 2016
1 parent 756bc76 commit 45aa955
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -13,3 +13,6 @@
[submodule "extensions/feeds"]
path = extensions/feeds
url = git://github.com/AKSW/feeds.ontowiki.git
[submodule "Thesisannouncements"]
path = Thesisannouncements
url = https://github.com/AKSW/googledoc-viewer.git
2 changes: 1 addition & 1 deletion .htaccess
Expand Up @@ -30,6 +30,7 @@
# do not rewrite requests on /robots.txt or /maintenance.html
RewriteCond %{REQUEST_URI} !/(robots.txt|maintenance.html|google1dee60de22057204.html|dataid.ttl)$
RewriteCond %{REQUEST_URI} !/BibsonomyProxy/.*$
RewriteCond %{REQUEST_URI} !/Thesisannouncements/.*$
# do not rewrite requests on resource under public in extensions
RewriteCond %{REQUEST_URI} !/extensions/.*/public/.*$

Expand Down Expand Up @@ -75,4 +76,3 @@
# this files parses the config ini generates the cache id and directly
# looks for the object cache and outputs it
#php_value auto_prepend_file './extensions/site/FastCacheLoad.php'

1 change: 1 addition & 0 deletions Thesisannouncements
Submodule Thesisannouncements added at 68a75b
66 changes: 66 additions & 0 deletions site/items/thesisannouncements.phtml
@@ -0,0 +1,66 @@
<?php
/**
* This file is part of the {@link http://ontowiki.net OntoWiki} project.
*
* @copyright Copyright (c) 2015, {@link http://aksw.org AKSW}
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
*/

/**
* aksw.org supervison template
*
* this template renders a resources thesis supervisons
*/

$baseUrl = 'http://aksw.org/Thesisannouncements';

$supervisorTag = $this->literal(array(
'property' => 'aksw:supervisorTag',
'plain' => true
));
$templateOptions = $this->literal(array(
'property' => 'site:templateOption',
'array' => 'true'
));
if (
(isset($supervisorTag) && !empty($supervisorTag)) ||
(isset($this->options['enabled']) && $this->options['enabled'])
) :
?>

<?php if (in_array('noheading', $templateOptions) === false) : ?>
<h1>Thesis and Essay Proposals</h1>
<?php endif; ?>

<div id="thesisproposal_filter"></div>

<div id="thesisproposal_reply"></div>

<script src="<?= $baseUrl ?>/formhandler.js"></script>
<script type="text/javascript">

var endpoint = '<?= $baseUrl ?>/requestHandler.php';
var id = 'thesisproposal_filter';
var replyId = 'thesisproposal_reply';

var labels = {
"Sorry, no topic matched your criteria." : "Sorry, no topic matched your criteria.",
"status":"Status",
"type": "Type",
"bachelorThesis": "Bachelor Thesis",
"masterThesis": "Master Thesis",
"project": "Project",
"dissertation": "Dissertation"
};

var selector;
<?php if (isset($supervisorTag) && !empty($supervisorTag)): ?>
//if ($this->property("rdf:type") == "foaf:Person")
selector = {"supervisor" :"<?= $supervisorTag ?>"};
<?php endif; ?>

$(document).ready(function(){
showform(endpoint,id,replyId,labels,selector);
});
</script>
<?php endif; ?>
7 changes: 5 additions & 2 deletions site/types/person.phtml
Expand Up @@ -89,7 +89,10 @@ $buttons = $this->querylist($queryForButtons, 'local/items/buttons.phtml');

<?php echo $this->literal(array('tag' => 'div', 'class' => 'content')) ?>
<?php echo $currentProjects, $pastProjects; ?>
<?php echo $this->renderx(array(
<?php
echo $this->renderx(array(
'template' => 'local/items/thesisannouncements.phtml'
));
echo $this->renderx(array(
'template' => 'local/items/publications.phtml'
));

51 changes: 51 additions & 0 deletions site/types/teaching.phtml
@@ -0,0 +1,51 @@
<?php
/**
* This file is part of the {@link http://ontowiki.net OntoWiki} project.
*
* @copyright Copyright (c) 2011, {@link http://aksw.org AKSW}
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
*/

/**
* aksw.org project template
*
* arranges the content for the project class
*/

// prepare hookline and abstract (both optional)
// yes, hookline also for documents please :-)
$hookline = $this->literal(array(
'property' => 'aksw:hookline',
'class' => 'hookline',
'prefix' => '<span class="hideme">:</span> '
));
$abstract = $this->literal(array(
'property' => 'dcterms:abstract',
'tag' => 'p',
'class' => 'abstract'
));

// create optional side navigation
$sideNavigation = $this->navigationList(
array(
'navProperty' => 'http://aksw.org/schema/sideNavigation',
'navClass' => 'nav-sidelinks',
'suffix' => '<!-- /#nav-sidelinks -->',
'activeUrl' => $this->resourceUri
)
);
echo $sideNavigation;
?>
<header class="intro">
<h1><?php echo $this->title . $hookline ?></h1>
<?php echo $abstract ?>
</header> <!-- /.intro -->
<?php
echo $this->literal(array('tag' => 'div', 'class' => 'content')); // uses default content properties
echo $this->renderx(array(
'template' => 'local/items/thesisannouncements.phtml',
'enabled' => true
));
echo $this->renderx(array(
'template' => 'local/items/publications.phtml'
));

0 comments on commit 45aa955

Please sign in to comment.