Comment 5 for bug 283524

Revision history for this message
rejon (rejon) wrote :

Ok, Greg added licenses[] to the /type/edition

The type must be string, not URI.

Then, have to add code to:

http://pdregistry.ca/templates/type/edition/view.tmpl?m=edit

With this code for reading license url and doing something about it:

                            <tr>
                                <td class="formheader$rule" width="100%">$_t[name]:</td>
                                $if name == "lccn":
                                    $if lccn: <td class="formfield$rule" width="100%"><a href="$lccn">$:thingrepr(page[name])</a></td>
                                $elif name == "subjects":
                                    <td class="formfield$rule" width="100%">$:utf8(thingrepr(page[name])).replace('--', '&mdash;')</td>
                                $elif name == "licenses":
                                    <td class="formfield$rule" width="100%">
                                    $for l in page[name]:
                                        <a href="$l">$l</a>
                                    </td>
                                $else:
                                    <td class="formfield$rule" width="100%">$:thingrepr(page[name])</td>
                            </tr>

Then, add something like this in the default edition view: http://pdregistry.ca/templates/type/edition/edit.tmpl?m=edit

$:macros.EditionEditRow(page, "licenses", unique=False, right=True)

This should allow basic cc license functionality.

Next to add a license selector UI with drop-downs.