From 5fdb1c3cf92ffd73a01ecc82ca91112aa17da350 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 20:57:24 +0200 Subject: Use of smarty to render zoom page. Main template file added, and zoom.php modified to work on it. We would probably rewrite cleaner zoom.php in the future. refs #47 --- smarty/templates/rpmphp/zoom.tpl | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 smarty/templates/rpmphp/zoom.tpl (limited to 'smarty/templates/rpmphp/zoom.tpl') diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl new file mode 100644 index 0000000..898ddce --- /dev/null +++ b/smarty/templates/rpmphp/zoom.tpl @@ -0,0 +1,66 @@ +{if $pkgdb} + +{else} + +{/if} + + +{foreach from=$summary key=k item=v} + + + + {if $k eq 'URL' or $k eq 'ViewVC'} + {$v} + {else} + {$v} + {/if} + + +{/foreach} +
Upstream info
{$k}:
+{if is_array($packages) and count($packages) > 0} + + + + + + + + + + + + + {assign var='prev' value=''} + {foreach from=$packages item=p} + + + + + repo_main neq $prev} id="pkgdb_{$p->repo_main}_owner"{/if}> + {if $p->repo_main neq $prev} + {if $fedpkg} + {getBranchPeople branch=$p->repo_main people='owner'} + {else} + {$ajax_infos} + {/if} + {/if} + + repo_main neq $prev} id="pkgdb_{$p->repo_main}_maintainers"{/if}> + {if $p->repo_main neq $prev} + {if $fedpkg} + {getBranchPeople branch=$p->repo_main people='people'} + {else} + {$ajax_infos} + {/if} + {/if} + + + {assign var='prev' value=$p->repo_main} + {/foreach} + +
Packages available in Fedora Repositories
BranchRepositoryVersion-ReleaseOwnerCo-maintainers
{if $p->repo_main neq $prev}{$p->repo_main}{/if}{$p->repo_sub} + {if $p->epoch}{$p->epoch}:{/if} + {$p->ver}-{$p->rel} +
+{/if} -- cgit From c14322fae3658cf448dc30a858666badfb1ce5b2 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 21:50:37 +0200 Subject: Show errors from template ; refs #47 --- smarty/templates/rpmphp/zoom.tpl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'smarty/templates/rpmphp/zoom.tpl') diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl index 898ddce..6d13dda 100644 --- a/smarty/templates/rpmphp/zoom.tpl +++ b/smarty/templates/rpmphp/zoom.tpl @@ -1,3 +1,12 @@ +{if $error} + {if $error eq 'missing_name'} +

Missing package name

+
+

You have not specified any package name.

+

+
+ {/if} +{/if} {if $pkgdb} {else} -- cgit From 6319f882f69f641c068f8adb29b2af176353195c Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 22:07:53 +0200 Subject: Missed file in previous commit... ; refs #47 --- smarty/templates/rpmphp/zoom.tpl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'smarty/templates/rpmphp/zoom.tpl') diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl index 6d13dda..a498080 100644 --- a/smarty/templates/rpmphp/zoom.tpl +++ b/smarty/templates/rpmphp/zoom.tpl @@ -5,6 +5,8 @@

You have not specified any package name.

+ {else} +

Ooops, an error occured:
{$error}

{/if} {/if} {if $pkgdb} -- cgit From 3a7c67284db39bc8a0618903f7de93603867f4b0 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 22:42:39 +0200 Subject: Add classes for odd/even rows ; refs #47 --- smarty/templates/rpmphp/zoom.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'smarty/templates/rpmphp/zoom.tpl') diff --git a/smarty/templates/rpmphp/zoom.tpl b/smarty/templates/rpmphp/zoom.tpl index a498080..e60161c 100644 --- a/smarty/templates/rpmphp/zoom.tpl +++ b/smarty/templates/rpmphp/zoom.tpl @@ -43,8 +43,8 @@ {assign var='prev' value=''} - {foreach from=$packages item=p} - + {foreach from=$packages item=p name=plist} + {if $p->repo_main neq $prev}{$p->repo_main}{/if} {$p->repo_sub} -- cgit