Skip to content

Conversation

deveaud-m
Copy link
Contributor

Create two new tables: obligation_ref and obligation_map.

The table obligation_ref contains the topic and text of the obligations.
The table obligation_map maps obligation references to licenses.

The combination of an obligation topic (ob_topic) and text (ob_text)
must be unique. One obligation can be mapped to several licenses.
The license shortnames are used in the UI, only licenses already
available in the license_ref table can be used. The UI uses javascript
code for the license selection, the implementation is based on "select2".

CSV export and import functions are available. The license list
is exported as a string with ";" as separator.

@max-wittig
Copy link
Contributor

Code looks good to me and seems to work. But where did you use select2? I can't seem to see it being used.

$vars['licenseSelectorName'] = 'licenseSelector[]';
$vars['licenseSelectorId'] = 'licenseSelectorId';
$scripts = "<script src='scripts/tools.js' type='text/javascript'></script>
<script src='scripts/select2.full.min.js'></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max-wittig This is where the select2 function is integrated into the obligation template

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, if I'm not understanding something correctly, but this doesn't look like select2
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max-wittig Look at the tab "Add Obligation" from the menu "Obligation Admin"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's also not select2 for me
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you're using an older version of this pull request, the last commit is 496f747

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right. Weird I just checked it out this morning. I'm sorry

Copy link
Contributor Author

@deveaud-m deveaud-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max-wittig Why do I need this in the obligation management feature? I'm not using the browsable license list currently but only a static list of the license shortnames.

Copy link
Contributor

@max-wittig max-wittig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

…anagement

Create two new tables: "obligation_ref" and "obligation_map".
The table "obligation_ref" contains the topic and text of the obligations.
The table "obligation_map" maps obligation references to licenses.

The combination of an obligation topic (ob_topic) and text (ob_text)
must be unique. One obligation can be mapped to several licenses.
The license shortnames are used in the UI, only licenses already
available in the "license_ref" table can be used. The UI uses javascript
code for the license selection, the implementation is based on "select2".

CSV export and import functions are available. The license list
is exported as a string with ";" as separator.
@shaheemazmalmmd shaheemazmalmmd merged commit 3af5d86 into master May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants