[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 57783ac9e284dc7f19d3d90b37e055fb142d7c03

Stefan Hornburg racke at rt.icdevgroup.org
Thu May 7 16:17:10 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange wellwell catalog".

The branch, master has been updated
       via  57783ac9e284dc7f19d3d90b37e055fb142d7c03 (commit)
      from  2b43316d5606217fdad42ec7a9e5f8a9b2fd976c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 57783ac9e284dc7f19d3d90b37e055fb142d7c03
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu May 7 18:16:51 2009 +0200

    [form_progress_container] added

-----------------------------------------------------------------------

Summary of changes and diff:
 code/form_progress_container.tag |   55 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 code/form_progress_container.tag

diff --git a/code/form_progress_container.tag b/code/form_progress_container.tag
new file mode 100644
index 0000000..3ad15bf
--- /dev/null
+++ b/code/form_progress_container.tag
@@ -0,0 +1,55 @@
+UserTag form_progress_container Order name
+UserTag form_progress_container AddAttr
+UserTag form_progress_container HasEndTag
+UserTag form_progress_container Routine <<EOR
+sub {
+	my ($name, $opt, $body) = @_;
+	my ($name_qtd, $sql, @results, $position, $forms, $content);
+
+	@results = $Tag->form_list($name);
+	$position = $Session->{form_series}->{$name} || 1;
+	$forms = scalar(@{$results[0]}) || 1;
+
+	$Tag->tmp('progress_slice_width', int(1 / $forms * 100));
+	$Tag->tmp('progress_percent_width', int($position / $forms * 100));
+	$Tag->tmp('progress_forms', $forms);
+
+	if ($forms > 1 && $opt->{links}) {
+		my ($showlinks, $partpos, $curpart);
+
+		$showlinks = 1;
+		$partpos = $results[1]->{part};
+
+		# for some parts links might not be appropriate (e.g. receipt)
+		if ($opt->{parts_without_links}) {
+			$curpart = $results[0]->[$position - 1]->[$partpos];
+			if (grep {$curpart eq $_} split(/\s*,\s*/, $opt->{parts_without_links})) {
+				$showlinks = 0;
+			}
+		}
+
+		if ($showlinks) {
+			push(@results, 'progress_url');
+			$results[1]->{progress_url} = scalar(@results) - 3;
+
+			for (my $i = 0; $i < $forms; $i++) {
+				if ($i < $position - 1) {
+					push (@{$results[0]->[$i]}, $Tag->area({href => $name,
+						form => "form_series_jump=$results[0]->[$i]->[$partpos]"}));
+				}
+				push (@{$results[0]->[$i]}, '');
+			}
+		}
+	}	
+
+	$content = $Tag->loop({object => {
+			mv_results => $results[0],
+			mv_field_hash => $results[1]
+		},
+		prefix => 'item',
+		body => $body}
+	);
+
+	return $content;
+}
+EOR


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list