Merge branch 'develop' of git://projects.ceondo.com/indefero into develop

master
Thomas Keller 2010-10-16 01:19:17 +02:00
commit 972df3b231
22 changed files with 445 additions and 309 deletions

View File

@ -15,8 +15,7 @@ res=$(cd "$dir" && /bin/pwd || "$dir")
SCRIPTDIR="$res/$(readlink $0)" SCRIPTDIR="$res/$(readlink $0)"
PHP_POST_PUSH=$SCRIPTDIR/mtnpostpush.php PHP_POST_PUSH=$SCRIPTDIR/mtnpostpush.php
base=$(basename "$0") TMPFILE=$(mktemp /tmp/mtn-post-push.XXXXXX) || exit 1
TMPFILE=$(mktemp /tmp/${tempfoo}.XXXXXX) || exit 1
while read rev; do echo $rev >> $TMPFILE; done while read rev; do echo $rev >> $TMPFILE; done
echo php $PHP_POST_PUSH "$1" \< $TMPFILE \&\& rm -f $TMPFILE |\ echo php $PHP_POST_PUSH "$1" \< $TMPFILE \&\& rm -f $TMPFILE |\

View File

@ -313,6 +313,7 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
'labels_download_one_max' => IDF_Form_UploadConf::init_one_max, 'labels_download_one_max' => IDF_Form_UploadConf::init_one_max,
'labels_wiki_predefined' => IDF_Form_WikiConf::init_predefined, 'labels_wiki_predefined' => IDF_Form_WikiConf::init_predefined,
'labels_wiki_one_max' => IDF_Form_WikiConf::init_one_max, 'labels_wiki_one_max' => IDF_Form_WikiConf::init_one_max,
'labels_issue_template' => IDF_Form_IssueTrackingConf::init_template,
'labels_issue_open' => IDF_Form_IssueTrackingConf::init_open, 'labels_issue_open' => IDF_Form_IssueTrackingConf::init_open,
'labels_issue_closed' => IDF_Form_IssueTrackingConf::init_closed, 'labels_issue_closed' => IDF_Form_IssueTrackingConf::init_closed,
'labels_issue_predefined' => IDF_Form_IssueTrackingConf::init_predefined, 'labels_issue_predefined' => IDF_Form_IssueTrackingConf::init_predefined,

View File

@ -45,6 +45,9 @@ class IDF_Form_IssueCreate extends Pluf_Form
or $this->user->hasPerm('IDF.project-member', $this->project)) { or $this->user->hasPerm('IDF.project-member', $this->project)) {
$this->show_full = true; $this->show_full = true;
} }
$contentTemplate = $this->project->getConf()->getVal(
'labels_issue_template', IDF_Form_IssueTrackingConf::init_template
);
$this->fields['summary'] = new Pluf_Form_Field_Varchar( $this->fields['summary'] = new Pluf_Form_Field_Varchar(
array('required' => true, array('required' => true,
'label' => __('Summary'), 'label' => __('Summary'),
@ -57,7 +60,7 @@ class IDF_Form_IssueCreate extends Pluf_Form
$this->fields['content'] = new Pluf_Form_Field_Varchar( $this->fields['content'] = new Pluf_Form_Field_Varchar(
array('required' => true, array('required' => true,
'label' => __('Description'), 'label' => __('Description'),
'initial' => '', 'initial' => $contentTemplate,
'widget' => 'Pluf_Form_Widget_TextareaInput', 'widget' => 'Pluf_Form_Widget_TextareaInput',
'widget_attrs' => array( 'widget_attrs' => array(
'cols' => 58, 'cols' => 58,

View File

@ -31,6 +31,15 @@ class IDF_Form_IssueTrackingConf extends Pluf_Form
* Defined as constants to easily access the value in the * Defined as constants to easily access the value in the
* IssueUpdate/Create form in the case nothing is in the db yet. * IssueUpdate/Create form in the case nothing is in the db yet.
*/ */
const init_template = 'Steps to reproduce the problem:
1.
2.
3.
Expected result:
Actual result:
';
const init_open = 'New = Issue has not had initial review yet const init_open = 'New = Issue has not had initial review yet
Accepted = Problem reproduced / Need acknowledged Accepted = Problem reproduced / Need acknowledged
Started = Work on this issue has begun'; Started = Work on this issue has begun';
@ -66,6 +75,15 @@ Maintainability = Hinders future changes';
public function initFields($extra=array()) public function initFields($extra=array())
{ {
$this->fields['labels_issue_template'] = new Pluf_Form_Field_Varchar(
array('required' => false,
'label' => __('Define an issue template to hint the reporter to provide certain information'),
'initial' => self::init_template,
'widget_attrs' => array('rows' => 7,
'cols' => 75),
'widget' => 'Pluf_Form_Widget_TextareaInput',
));
$this->fields['labels_issue_open'] = new Pluf_Form_Field_Varchar( $this->fields['labels_issue_open'] = new Pluf_Form_Field_Varchar(
array('required' => true, array('required' => true,
'label' => __('Open issue status values'), 'label' => __('Open issue status values'),
@ -99,8 +117,6 @@ Maintainability = Hinders future changes';
'widget_attrs' => array('size' => 60), 'widget_attrs' => array('size' => 60),
)); ));
} }
} }

View File

@ -112,6 +112,7 @@ function IDF_Middleware_ContextPreProcessor($request)
$c = array_merge($c, $request->rights); $c = array_merge($c, $request->rights);
} }
$c['usherConfigured'] = Pluf::f("mtn_usher_conf", null) !== null; $c['usherConfigured'] = Pluf::f("mtn_usher_conf", null) !== null;
$c['allProjects'] = IDF_Views::getProjects($request->user);
return $c; return $c;
} }

View File

@ -250,7 +250,9 @@ class IDF_Plugin_SyncMonotone
array('key' => 'server', 'values' => array($shortname)), array('key' => 'server', 'values' => array($shortname)),
array('key' => 'local', 'values' => array( array('key' => 'local', 'values' => array(
'--confdir', $projectpath, '--confdir', $projectpath,
'-d', $dbfile '-d', $dbfile,
'--timestamps',
'--ticker=dot'
)), )),
); );

View File

@ -413,7 +413,7 @@ class IDF_Scm_Monotone extends IDF_Scm
$certs = $scm->_getCerts($revs[0]); $certs = $scm->_getCerts($revs[0]);
// for the very seldom case that a revision // for the very seldom case that a revision
// has no branch certificate // has no branch certificate
if (count($certs['branch']) == 0) { if (!array_key_exists('branch', $certs)) {
$branch = '*'; $branch = '*';
} }
else else

View File

@ -61,6 +61,66 @@ class IDF_Views_Project
$request); $request);
} }
/**
* Returns an associative array with available model filters
*
* @return array
*/
private static function getAvailableModelFilters()
{
return array(
'all' => __('All Updates'),
'commits' => __('Commits'),
'issues' => __('Issues and Comments'),
'downloads' => __('Downloads'),
'documents' => __('Documents'),
'reviews' => __('Reviews and Patches'),
);
}
/**
* Returns an array of model classes for which the current user
* has rights and which should be used according to his filter
*
* @param object $request
* @param string $model_filter
* @return array
*/
private static function determineModelClasses($request, $model_filter = 'all')
{
$classes = array();
if (true === IDF_Precondition::accessSource($request) &&
($model_filter == 'all' || $model_filter == 'commits')) {
$classes[] = '\'IDF_Commit\'';
// FIXME: this looks like a hack...
IDF_Scm::syncTimeline($request->project);
}
if (true === IDF_Precondition::accessIssues($request) &&
($model_filter == 'all' || $model_filter == 'issues')) {
$classes[] = '\'IDF_Issue\'';
$classes[] = '\'IDF_IssueComment\'';
}
if (true === IDF_Precondition::accessDownloads($request) &&
($model_filter == 'all' || $model_filter == 'downloads')) {
$classes[] = '\'IDF_Upload\'';
}
if (true === IDF_Precondition::accessWiki($request) &&
($model_filter == 'all' || $model_filter == 'documents')) {
$classes[] = '\'IDF_WikiPage\'';
$classes[] = '\'IDF_WikiRevision\'';
}
if (true === IDF_Precondition::accessReview($request) &&
($model_filter == 'all' || $model_filter == 'reviews')) {
$classes[] = '\'IDF_Review_Comment\'';
$classes[] = '\'IDF_Review_Patch\'';
}
if (count($classes) == 0) {
$classes[] = '\'IDF_Dummy\'';
}
return $classes;
}
/** /**
* Timeline of the project. * Timeline of the project.
*/ */
@ -68,38 +128,21 @@ class IDF_Views_Project
public function timeline($request, $match) public function timeline($request, $match)
{ {
$prj = $request->project; $prj = $request->project;
$title = sprintf(__('%s Updates'), (string) $prj);
$team = $prj->getMembershipData(); $model_filter = @$match[2];
$all_model_filters = self::getAvailableModelFilters();
if (!array_key_exists($model_filter, $all_model_filters)) {
$model_filter = 'all';
}
$title = (string)$prj . ' ' . $all_model_filters[$model_filter];
$pag = new IDF_Timeline_Paginator(new IDF_Timeline()); $pag = new IDF_Timeline_Paginator(new IDF_Timeline());
$pag->class = 'recent-issues'; $pag->class = 'recent-issues';
$pag->item_extra_props = array('request' => $request); $pag->item_extra_props = array('request' => $request);
$pag->summary = __('This table shows the project updates.'); $pag->summary = __('This table shows the project updates.');
// Need to check the rights
$rights = array(); $classes = self::determineModelClasses($request, $model_filter);
if (true === IDF_Precondition::accessSource($request)) { $sql = sprintf('model_class IN (%s)', implode(', ', $classes));
$rights[] = '\'IDF_Commit\'';
IDF_Scm::syncTimeline($request->project);
}
if (true === IDF_Precondition::accessIssues($request)) {
$rights[] = '\'IDF_Issue\'';
$rights[] = '\'IDF_IssueComment\'';
}
if (true === IDF_Precondition::accessDownloads($request)) {
$rights[] = '\'IDF_Upload\'';
}
if (true === IDF_Precondition::accessWiki($request)) {
$rights[] = '\'IDF_WikiPage\'';
$rights[] = '\'IDF_WikiRevision\'';
}
if (true === IDF_Precondition::accessReview($request)) {
$rights[] = '\'IDF_Review_Comment\'';
$rights[] = '\'IDF_Review_Patch\'';
}
if (count($rights) == 0) {
$rights[] = '\'IDF_Dummy\'';
}
$sql = sprintf('model_class IN (%s)', implode(', ', $rights));
$pag->forced_where = new Pluf_SQL('project=%s AND '.$sql, $pag->forced_where = new Pluf_SQL('project=%s AND '.$sql,
array($prj->id)); array($prj->id));
$pag->sort_order = array('creation_dtime', 'ASC'); $pag->sort_order = array('creation_dtime', 'ASC');
@ -113,32 +156,23 @@ class IDF_Views_Project
$pag->items_per_page = 20; $pag->items_per_page = 20;
$pag->no_results_text = __('No changes were found.'); $pag->no_results_text = __('No changes were found.');
$pag->setFromRequest($request); $pag->setFromRequest($request);
$downloads = array();
if ($request->rights['hasDownloadsAccess']) {
$tags = IDF_Views_Download::getDownloadTags($prj);
// the first tag is the featured, the last is the deprecated.
$downloads = $tags[0]->get_idf_upload_list();
}
$pages = array();
if ($request->rights['hasWikiAccess']) {
$tags = IDF_Views_Wiki::getWikiTags($prj);
$pages = $tags[0]->get_idf_wikipage_list();
}
if (!$request->user->isAnonymous() and $prj->isRestricted()) { if (!$request->user->isAnonymous() and $prj->isRestricted()) {
$feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed_auth', $feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed_auth',
array($prj->shortname, array($prj->shortname,
$model_filter,
IDF_Precondition::genFeedToken($prj, $request->user))); IDF_Precondition::genFeedToken($prj, $request->user)));
} else { } else {
$feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed', $feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed',
array($prj->shortname)); array($prj->shortname, $model_filter));
} }
return Pluf_Shortcuts_RenderToResponse('idf/project/timeline.html', return Pluf_Shortcuts_RenderToResponse('idf/project/timeline.html',
array( array(
'page_title' => $title, 'page_title' => $title,
'feedurl' => $feedurl, 'feedurl' => $feedurl,
'timeline' => $pag, 'timeline' => $pag,
'team' => $team, 'model_filter' => $model_filter,
'downloads' => $downloads, 'all_model_filters' => $all_model_filters,
), ),
$request); $request);
@ -156,31 +190,17 @@ class IDF_Views_Project
public function timelineFeed($request, $match) public function timelineFeed($request, $match)
{ {
$prj = $request->project; $prj = $request->project;
// Need to check the rights $model_filter = @$match[2];
$rights = array();
if (true === IDF_Precondition::accessSource($request)) { $model_filter = @$match[2];
$rights[] = '\'IDF_Commit\''; $all_model_filters = self::getAvailableModelFilters();
IDF_Scm::syncTimeline($request->project); if (!array_key_exists($model_filter, $all_model_filters)) {
$model_filter = 'all';
} }
if (true === IDF_Precondition::accessIssues($request)) { $title = $all_model_filters[$model_filter];
$rights[] = '\'IDF_Issue\'';
$rights[] = '\'IDF_IssueComment\''; $classes = self::determineModelClasses($request, $model_filter);
} $sqls = sprintf('model_class IN (%s)', implode(', ', $classes));
if (true === IDF_Precondition::accessDownloads($request)) {
$rights[] = '\'IDF_Upload\'';
}
if (true === IDF_Precondition::accessWiki($request)) {
$rights[] = '\'IDF_WikiPage\'';
$rights[] = '\'IDF_WikiRevision\'';
}
if (true === IDF_Precondition::accessReview($request)) {
$rights[] = '\'IDF_Review_Comment\'';
$rights[] = '\'IDF_Review_Patch\'';
}
if (count($rights) == 0) {
$rights[] = '\'IDF_Dummy\'';
}
$sqls = sprintf('model_class IN (%s)', implode(', ', $rights));
$sql = new Pluf_SQL('project=%s AND '.$sqls, array($prj->id)); $sql = new Pluf_SQL('project=%s AND '.$sqls, array($prj->id));
$params = array( $params = array(
'filter' => $sql->gen(), 'filter' => $sql->gen(),
@ -203,7 +223,6 @@ class IDF_Views_Project
} }
$out = Pluf_Template::markSafe(implode("\n", $out)); $out = Pluf_Template::markSafe(implode("\n", $out));
$tmpl = new Pluf_Template('idf/index.atom'); $tmpl = new Pluf_Template('idf/index.atom');
$title = __('Updates');
$feedurl = Pluf::f('url_base').Pluf::f('idf_base').$request->query; $feedurl = Pluf::f('url_base').Pluf::f('idf_base').$request->query;
$viewurl = Pluf_HTTP_URL_urlForView('IDF_Views_Project::timeline', $viewurl = Pluf_HTTP_URL_urlForView('IDF_Views_Project::timeline',
array($prj->shortname)); array($prj->shortname));
@ -277,7 +296,8 @@ class IDF_Views_Project
} }
} else { } else {
$params = array(); $params = array();
$keys = array('labels_issue_open', 'labels_issue_closed', $keys = array('labels_issue_template',
'labels_issue_open', 'labels_issue_closed',
'labels_issue_predefined', 'labels_issue_one_max'); 'labels_issue_predefined', 'labels_issue_one_max');
foreach ($keys as $key) { foreach ($keys as $key) {
$_val = $conf->getVal($key, false); $_val = $conf->getVal($key, false);

View File

@ -533,8 +533,10 @@ class IDF_Views_Source
if (0 === strpos($fileinfo[0], 'text/')) { if (0 === strpos($fileinfo[0], 'text/')) {
return true; return true;
} }
$ext = 'mdtext php-dist h gitignore diff patch' $ext = 'mdtext php-dist h gitignore diff patch';
.Pluf::f('idf_extra_text_ext', ''); $extra_ext = trim(Pluf::f('idf_extra_text_ext', ''));
if (!empty($extra_ext))
$ext .= ' ' . $extra_ext;
$ext = array_merge(self::$supportedExtenstions, explode(' ' , $ext)); $ext = array_merge(self::$supportedExtenstions, explode(' ' , $ext));
return (in_array($fileinfo[2], $ext)); return (in_array($fileinfo[2], $ext));
} }

View File

@ -205,7 +205,7 @@ $cfg['db_database'] = 'website'; # put absolute path to the db if you
# are using SQLite. # are using SQLite.
# #
# The extension of the downloads are limited. You can add extra # The extension of the downloads are limited. You can add extra
# extensions here. The list must start with a space. # extensions here.
# $cfg['idf_extra_upload_ext'] = 'ext1 ext2'; # $cfg['idf_extra_upload_ext'] = 'ext1 ext2';
# #
# By default, the size of the downloads is limited to 2MB. # By default, the size of the downloads is limited to 2MB.
@ -256,6 +256,13 @@ $cfg['allowed_scm'] = array('git' => 'IDF_Scm_Git',
'mtn' => 'IDF_Scm_Monotone', 'mtn' => 'IDF_Scm_Monotone',
); );
# Set to true when uploaded public keys should not only be validated
# syntactically, but also by the specific backend. For SSH public
# keys, ssh-keygen(3) must be available and usable in PATH, for
# monotone public keys, the monotone binary (as configured above)
# is used.
# $cfg['idf_strong_key_check'] = false;
# If you want to use another memtypes database # If you want to use another memtypes database
# $cfg['idf_mimetypes_db'] = '/etc/mime.types'; # $cfg['idf_mimetypes_db'] = '/etc/mime.types';

View File

@ -74,18 +74,18 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/$#',
'model' => 'IDF_Views_Project', 'model' => 'IDF_Views_Project',
'method' => 'home'); 'method' => 'home');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/(\w+)/$#',
'base' => $base, 'base' => $base,
'model' => 'IDF_Views_Project', 'model' => 'IDF_Views_Project',
'method' => 'timeline'); 'method' => 'timeline');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/(\w+)/$#',
'base' => $base, 'base' => $base,
'model' => 'IDF_Views_Project', 'model' => 'IDF_Views_Project',
'method' => 'timelineFeed', 'method' => 'timelineFeed',
'name' => 'idf_project_timeline_feed'); 'name' => 'idf_project_timeline_feed');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/token/(.*)/$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/(\w+)/token/(.*)/$#',
'base' => $base, 'base' => $base,
'model' => 'IDF_Views_Project', 'model' => 'IDF_Views_Project',
'method' => 'timelineFeed', 'method' => 'timelineFeed',

View File

@ -96,7 +96,7 @@ Pluf_Signal::connect('IDF_Key::postSave',
array('IDF_Plugin_SyncMonotone', 'entry')); array('IDF_Plugin_SyncMonotone', 'entry'));
Pluf_Signal::connect('IDF_Key::preDelete', Pluf_Signal::connect('IDF_Key::preDelete',
array('IDF_Plugin_SyncMonotone', 'entry')); array('IDF_Plugin_SyncMonotone', 'entry'));
Pluf_Signal::connect('phppostpush.php::run', Pluf_Signal::connect('mtnpostpush.php::run',
array('IDF_Plugin_SyncMonotone', 'entry')); array('IDF_Plugin_SyncMonotone', 'entry'));
# #

View File

@ -4,6 +4,12 @@
<form method="post" action="."> <form method="post" action=".">
<table class="form" summary=""> <table class="form" summary="">
<tr> <tr>
<td colspan="2"><strong>{$form.f.labels_issue_template.labelTag}:</strong><br />
{if $form.f.labels_issue_template.errors}{$form.f.labels_issue_template.fieldErrors}{/if}
{$form.f.labels_issue_template|unsafe}
</td>
</tr>
<tr>
<td colspan="2"><strong>{$form.f.labels_issue_open.labelTag}:</strong><br /> <td colspan="2"><strong>{$form.f.labels_issue_open.labelTag}:</strong><br />
{if $form.f.labels_issue_open.errors}{$form.f.labels_issue_open.fieldErrors}{/if} {if $form.f.labels_issue_open.errors}{$form.f.labels_issue_open.fieldErrors}{/if}
{$form.f.labels_issue_open|unsafe} {$form.f.labels_issue_open|unsafe}

View File

@ -29,16 +29,13 @@
<![endif]--> <![endif]-->
{block extraheader}{/block} {block extraheader}{/block}
<title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title> <title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
</head> </head>
<body> <body>
<div id="{block docid}doc3{/block}"> <div id="{block docid}doc3{/block}">
<div id="hd"> <div id="hd">
{if $project}<h1 class="project-title">{$project}</h1>{/if} {if $project}<h1 class="project-title">{$project}</h1>{/if}
<p class="top"><a href="#title" accesskey="2"></a> {include 'idf/main-menu.html'}
{if !$user.isAnonymous()}{aurl 'url', 'idf_dashboard'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
{if $project} | <a href="{url 'IDF_Views::index'}">{trans 'Project List'}</a>{/if}
| <a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a>
</p>
<div id="header"> <div id="header">
<div id="main-tabs"> <div id="main-tabs">
{if $project} {if $project}
@ -69,7 +66,6 @@
</div> </div>
<div id="ft">{block foot}{/block}</div> <div id="ft">{block foot}{/block}</div>
</div> </div>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
{include 'idf/js-hotkeys.html'} {include 'idf/js-hotkeys.html'}
{block javascript}{/block} {block javascript}{/block}
{if $project} {if $project}

View File

@ -29,15 +29,12 @@
<![endif]--> <![endif]-->
{block extraheader}{/block} {block extraheader}{/block}
<title>{block pagetitle}{$page_title|strip_tags}{/block}</title> <title>{block pagetitle}{$page_title|strip_tags}{/block}</title>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
</head> </head>
<body> <body>
<div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}"> <div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}">
<div id="hd"> <div id="hd">
<p class="top"><a href="#title" accesskey="2"></a> {include 'idf/main-menu.html'}
{if !$user.isAnonymous()}{aurl 'url', 'idf_dashboard'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
| <a href="{url 'IDF_Views::index'}">{trans 'Project List'}</a> {if $isAdmin}| <a href="{url 'IDF_Views_Admin::projects'}">{trans 'Forge Management'}</a>{/if}
| <a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a>
</p>
<h1 id="title" class="title">{block title}{$page_title}{/block}</h1> <h1 id="title" class="title">{block title}{$page_title}{/block}</h1>
</div> </div>
<div id="bd"> <div id="bd">
@ -53,7 +50,6 @@
</div> </div>
<div id="ft">{block foot}{/block}</div> <div id="ft">{block foot}{/block}</div>
</div> </div>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
{include 'idf/js-hotkeys.html'} {include 'idf/js-hotkeys.html'}
{block javascript}{/block} {block javascript}{/block}
</body> </body>

View File

@ -29,17 +29,13 @@
<![endif]--> <![endif]-->
{block extraheader}{/block} {block extraheader}{/block}
<title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title> <title>{block pagetitle}{$page_title|strip_tags}{/block}{if $project} - {$project.shortdesc}{/if}</title>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
</head> </head>
<body> <body>
<div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}"> <div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}">
<div id="hd"> <div id="hd">
{if $project}<h1 class="project-title">{$project}</h1>{/if} {if $project}<h1 class="project-title">{$project}</h1>{/if}
<p class="top"><a href="#title" accesskey="2"></a> {include 'idf/main-menu.html'}
{if !$user.isAnonymous()}{aurl 'url', 'idf_dashboard'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>{else}<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a>{/if}
{if $project} | <a href="{url 'IDF_Views::index'}">{trans 'Project List'}</a>{/if}
{if $isAdmin}| <a href="{url 'IDF_Views_Admin::projects'}">{trans 'Forge Management'}</a>{/if}
| <a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a>
</p>
<div id="header"> <div id="header">
<div id="main-tabs"> <div id="main-tabs">
{if $project} {if $project}
@ -71,7 +67,6 @@
</div> </div>
<div id="ft">{block foot}{/block}</div> <div id="ft">{block foot}{/block}</div>
</div> </div>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
{include 'idf/js-hotkeys.html'} {include 'idf/js-hotkeys.html'}
{block javascript}{/block} {block javascript}{/block}
{if $project} {if $project}

View File

@ -29,16 +29,12 @@
<![endif]--> <![endif]-->
{block extraheader}{/block} {block extraheader}{/block}
<title>{block pagetitle}{$page_title|strip_tags}{/block}</title> <title>{block pagetitle}{$page_title|strip_tags}{/block}</title>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
</head> </head>
<body> <body>
<div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}"> <div id="{block docid}doc3{/block}" class="{block docclass}yui-t3{/block}">
<div id="hd"> <div id="hd">
<p class="top"><a href="#title" accesskey="2"></a> {include 'idf/main-menu.html'}
{aurl 'url', 'IDF_Views_User::dashboard'}{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans} <a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a>
| <a href="{url 'IDF_Views::index'}">{trans 'Project List'}</a>
| <a href="{url 'IDF_Views_Admin::projects'}">{trans 'Forge Management'}</a>
| <a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a>
</p>
<div id="header"> <div id="header">
<div id="main-tabs"> <div id="main-tabs">
<a href="{url 'IDF_Views_Admin::projects'}"{block tabprojects}{/block}>{trans 'Projects'}</a> <a href="{url 'IDF_Views_Admin::projects'}"{block tabprojects}{/block}>{trans 'Projects'}</a>
@ -64,7 +60,6 @@
</div> </div>
<div id="ft">{block foot}{/block}</div> <div id="ft">{block foot}{/block}</div>
</div> </div>
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
{include 'idf/js-hotkeys.html'} {include 'idf/js-hotkeys.html'}
{block javascript}{/block} {block javascript}{/block}
</body> </body>

View File

@ -3,7 +3,7 @@
// <!-- // <!--
{hotkey 'Shift+h', 'IDF_Views::faq'} {hotkey 'Shift+h', 'IDF_Views::faq'}
{if $project} {if $project}
{hotkey 'Shift+u', 'IDF_Views_Project::timeline', array($project.shortname)} {hotkey 'Shift+u', 'IDF_Views_Project::timeline', array($project.shortname, 'all')}
{if $hasIssuesAccess}{hotkey 'Shift+a', 'IDF_Views_Issue::create', array($project.shortname)} {if $hasIssuesAccess}{hotkey 'Shift+a', 'IDF_Views_Issue::create', array($project.shortname)}
{hotkey 'Shift+i', 'IDF_Views_Issue::index', array($project.shortname)}{/if} {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 $hasDownloadsAccess}{hotkey 'Shift+d', 'IDF_Views_Download::index', array($project.shortname)}{/if}

View File

@ -0,0 +1,31 @@
<a href="#title" accesskey="2"></a>
<ul id="main-menu">
{if !$user.isAnonymous()}
{aurl 'url', 'idf_dashboard'}
<li>{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans}
<a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a></li>{else}<li>
<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a></li>
{/if}<li id="project-list"><a href="{url 'IDF_Views::index'}">{trans 'Project List'} &#x25be;</a>
{if $allProjects.count() != 0}
<ul>{foreach $allProjects as $p}
<li>{if $p.private}<img style="vertical-align: text-bottom;" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" /> {/if}
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}">{$p}</a></li>
{/foreach}</ul>
{/if}</li>{if $isAdmin}<li><a href="{url 'IDF_Views_Admin::projects'}">{trans 'Forge Management'}</a></li>{/if}<li>
<a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a></li>
</ul>
{if $allProjects.count() != 0}
<script type="text/javascript" charset="utf-8">
{literal}
$(document).ready(function() {
$('#project-list').bind('mouseenter', function(ev) {
$(this).find('ul').show();
}).bind('mouseleave', function(ev) {
$(this).find('ul').hide();
});
});
{/literal}
</script>
{/if}

View File

@ -3,7 +3,7 @@
{block tabhome} class="active"{/block} {block tabhome} class="active"{/block}
{block subtabs} {block subtabs}
<div id="sub-tabs"> <div id="sub-tabs">
{trans 'Welcome'} | <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname)}">{trans 'Latest Updates'}</a></strong>{superblock} {trans 'Welcome'} | <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, 'all')}">{trans 'Latest Updates'}</a></strong>{superblock}
</div> </div>
{/block} {/block}
{block body} {block body}

View File

@ -4,7 +4,7 @@
{block tabhome} class="active"{/block} {block tabhome} class="active"{/block}
{block subtabs} {block subtabs}
<div id="sub-tabs"> <div id="sub-tabs">
<a href="{url 'IDF_Views_Project::home', array($project.shortname)}">{trans 'Welcome'}</a> | <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname)}" class="active">{trans 'Latest Updates'}</a></strong>{superblock} <a href="{url 'IDF_Views_Project::home', array($project.shortname)}">{trans 'Welcome'}</a> | <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, 'all')}" class="active">{trans 'Latest Updates'}</a></strong>{superblock}
</div> </div>
{/block} {/block}
@ -13,26 +13,10 @@
{/block} {/block}
{block context} {block context}
{if count($downloads) > 0} <p><strong>{trans 'Filter by type'}</strong><br />
<p><strong>{trans 'Featured Downloads'}</strong><br /> {foreach $all_model_filters as $filter_key => $filter_name}
{foreach $downloads as $download} <span class="label{if $filter_key == $model_filter} active{/if}"><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, $filter_key)}">{$filter_name}</a></span><br />
<span class="label"><a href="{url 'IDF_Views_Download::view', array($project.shortname, $download.id)}" title="{$download.summary}">{$download}</a></span><br />
{/foreach} {/foreach}
<span class="label"> </span><span class="note"><a href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'show more...'}</a></span>
{/if}
{assign $ko = 'owners'}
{assign $km = 'members'}
<p><strong>{trans 'Development Team'}</strong><br />
{trans 'Admins'}<br />
{foreach $team[$ko] as $owner}{aurl 'url', 'IDF_Views_User::view', array($owner.login)}
<span class="label"><a class="label" href="{$url}">{$owner}</a></span><br />
{/foreach}
{if count($team[$km]) > 0}
{trans 'Happy Crew'}<br />
{foreach $team[$km] as $member}{aurl 'url', 'IDF_Views_User::view', array($member.login)}
<span class="label"><a class="label" href="{$url}">{$member}</a></span><br />
{/foreach}
{/if}
</p> </p>
{/block} {/block}

View File

@ -601,7 +601,6 @@ table.code td.code {
white-space: -o-pre-wrap; /* Opera 7 */ white-space: -o-pre-wrap; /* Opera 7 */
white-space: -pre-wrap; /* Opera 4-6 */ white-space: -pre-wrap; /* Opera 4-6 */
white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */ word-wrap: break-word; /* IE */
padding-left: 5px; padding-left: 5px;
} }
@ -717,3 +716,86 @@ div.deprecated-page {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
} }
/**
* main menu
*/
#main-menu {
padding: 0;
margin: 5px 0 13px;
}
#main-menu > li {
list-style-type: none;
margin-left: 5px;
padding-left: 5px;
border-left: 1px solid black;
display: inline-block;
line-height: 1em;
}
#main-menu > li:first-child {
margin-left: 0;
padding-left: 0;
border-left: none;
}
/**
* project list popup
*/
#project-list {
position: relative;
padding-left: 0 !important;
}
#project-list > a {
padding-left: 5px;
padding-right: 5px;
margin-top: -3px;
padding-top: 3px;
}
#project-list + li {
margin-left: 0;
}
#project-list ul {
display: none;
background: #A5E26A;
border-top: 0;
position: absolute;
padding: 5px 5px 5px 20px;
margin: 0;
z-index: 1000;
top: 1.1em;
-moz-border-radius: 0 3px 3px 3px;
border-radius: 0 3px 3px 3px;
-moz-box-shadow: 0 10px 20px #333;
-webkit-box-shadow: 0 10px 20px #333;
box-shadow: 0 10px 20px #333;
max-height: 400px;
overflow-x: hidden;
overflow-y: auto;
}
#project-list ul li {
padding: 5px;
padding-left: 0;
white-space: nowrap;
font-size: 0.95em;
list-style-type: square;
}
#project-list ul li a {
text-decoration: none;
}
#project-list:hover > a {
background: #A5E26A;
text-decoration: none;
}
#project-list:hover a {
color: #2E3436;
}