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/main.tpl | 71 ++++++++++++++++++++++++++++++++++++++++ smarty/templates/rpmphp/zoom.tpl | 66 +++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 smarty/templates/rpmphp/main.tpl create mode 100644 smarty/templates/rpmphp/zoom.tpl (limited to 'smarty/templates') diff --git a/smarty/templates/rpmphp/main.tpl b/smarty/templates/rpmphp/main.tpl new file mode 100644 index 0000000..7456773 --- /dev/null +++ b/smarty/templates/rpmphp/main.tpl @@ -0,0 +1,71 @@ + + + + Packages in Fedora - {$page_title} + + + + + +{if $name} + +{/if} + + + + +
+ +
+
+

You are here:

+
    +{foreach from=$ariane item=a} +
  • {$a.text}
  • +{/foreach} +
+
+{if not $name} +

Missing package name

+
+

You have not specified any package name.

+

+ + + +

+
+{else} +

{$page_title}

+ {$page_content} +{/if} +
+ +
+ + 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') 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') 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 4fded33567be2378d9ed9ac3e9265fa377b0d4eb Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 22:41:03 +0200 Subject: A flag to know if we're from a page that require a name ; refs #47 --- smarty/templates/rpmphp/main.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smarty/templates') diff --git a/smarty/templates/rpmphp/main.tpl b/smarty/templates/rpmphp/main.tpl index 7456773..6f12fdf 100644 --- a/smarty/templates/rpmphp/main.tpl +++ b/smarty/templates/rpmphp/main.tpl @@ -44,7 +44,7 @@ {/foreach} -{if not $name} +{if $name_required and not $name}

Missing package name

You have not specified any package name.

-- 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') 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 From cbd3c42f9d39f7d73c77cf811c7f65fce9cd1b55 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sat, 29 May 2010 22:44:10 +0200 Subject: Use of Smarty for index page ; apply coding standards, add license ; refs #46,48,47 --- smarty/templates/rpmphp/index.tpl | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 smarty/templates/rpmphp/index.tpl (limited to 'smarty/templates') diff --git a/smarty/templates/rpmphp/index.tpl b/smarty/templates/rpmphp/index.tpl new file mode 100644 index 0000000..df6cb52 --- /dev/null +++ b/smarty/templates/rpmphp/index.tpl @@ -0,0 +1,40 @@ +

Package reports

+ + + + + + + + + + + + + +{if $error} + + + +{else} + {foreach from=$repositories item=repo name=rlist} + + + + + + + + {/foreach} +{/if} + +
Analysed repositories
MainActiveSubUrlLast update
{$error}
{$repo.repo_name}{$repo.active}{$repo.sub_name}{$repo.url}{$repo.date}
+

Script sources

+

You can retrieve the current application sources from my GIT repository on github.com: http://github.com/remicollet/rpmphp.

+

Feedbacks, RFE and patches are welcome.

+ -- cgit