Added:
/wiki/pp_get_solution_list.wiki
=======================================
--- /dev/null
+++ /wiki/pp_get_solution_list.wiki Tue Feb 8 20:35:53 2011
@@ -0,0 +1,62 @@
+#summary This is the documentation page for the tag pp_solution_form
+#sidebar TableOfContents
+
+= Custom Tag: `pp_get_solution_list` =
+====_Module: pirate_issues====
+
+This tag populates the pp_solution namespace object with an object called
form. The form object contains HTML markup that renders into a form to
create a solution. For information on using variables within templates,
refer to http://docs.djangoproject.com/en/dev/topics/templates/.
+
+
+
+==_Arguments and Parameters_==
+
+ #. *dimension*:
+ * This parameter gives a ranking type.
+ * for example: `dimension="hot"`
+ * *All possible parameters:*
+ # `"hot"`: get solutions ranked by current popularity
+ # `"cont"`: get solutions ranked by controversy
+ # `"top"`: get all-time highly ranked solutions
+ # `"new"`: get new solutions
+ #. *issue*:
+ * This parameter tells the parent issue of the solution. This parameter
is supplied to the context in the variable `{{request.object}}`
+ #. *start*: Start integer index of the for slicing the solutions list
+ #. *end*: End integer index of the for slicing the solutions list
+
+==_Return value_==
+This adds the following objects to the context in the pp_solution
namespace object.
+
+The data within this object are:
+
+ * `pp_solution.count`:
+ This contains the HTML code for a form that can be used to create a new
issue. If this is used, none of the other fields need to be displayed since
this includes them all. Information about how this object can be slightly
formatted is
[http://docs.djangoproject.com/en/1.2/ref/forms/api/#outputting-forms-as-html
here].
+
+ * `pp_solution.solution_list`:
+ This contains the HTML code for the input tag that should be filled the
name of the group. Each solution subsequently includes the following data
variables:
+ * issue = Parent issue
+ * name = Name of the solution
+ * text = Description of this solution
+ * submit_date = Date and time of the solution submission
+ * user = User who submitted this solution
+ * arguments = Number of arguments associated with this solution
+
+
+
+==_Usage Notes_==
+ * *Assumptions*: None
+
+ * *Errors*: None
+
+==_Examples_==
+====Basic form====
+The following code will create an html form and will save the data when it
is posted. That data would then be viewable by pp_permgroup_list.
+Each issue object needs to be referenced as `iss_obj` to take advantage of
the `{% include '_solution.html' %}`. This html file references 'iss_obj'.
+{{{
+{% pp_get_solution_list issue=request.object dimension=request.dimension %}
+ {%for iss_obj in pp_solution.solution_list%}
+ {% include '_solution.html' %}
+ {% empty %}
+ No solutions yet! Add a solution.
+ {% endfor %}
+
+}}}