Using data parent for organization, project and task fields in books of doks or notes
This commit is contained in:
parent
99e96a895a
commit
1371a4bec5
6 changed files with 38 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
name = Storm Dok
|
||||
description = "Allows creation of documents about organizations, projects or tasks."
|
||||
dependencies[] = book
|
||||
dependencies[] = storm
|
||||
dependencies[] = stormorganization
|
||||
dependencies[] = stormproject
|
||||
|
|
|
@ -355,6 +355,24 @@ function stormdok_form(&$node) {
|
|||
drupal_set_breadcrumb($breadcrumb);
|
||||
|
||||
if (arg(1)=='add') {
|
||||
if (array_key_exists('parent', $_GET)) {
|
||||
$book_parent = book_link_load($_GET['parent']);
|
||||
if (isset($book_parent)) {
|
||||
$parent = node_load($book_parent['nid']);
|
||||
if (!empty($parent->organization_nid)) {
|
||||
$_GET['organization_nid'] = $parent->organization_nid;
|
||||
}
|
||||
if (!empty($parent->project_nid)) {
|
||||
$_GET['project_nid'] = $parent->project_nid;
|
||||
}
|
||||
elseif ($parent->type == 'stormproject') {
|
||||
$_GET['project_nid'] = $parent->nid;
|
||||
}
|
||||
if (!empty($parent->task_nid)) {
|
||||
$_GET['task_nid'] = $parent->task_nid;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (array_key_exists('organization_nid', $_GET) && !$node->organization_nid) {
|
||||
$node->organization_nid = $_GET['organization_nid'];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
name = Storm Note
|
||||
description = "Allows creation of notes about organizations, projects or tasks."
|
||||
dependencies[] = book
|
||||
dependencies[] = storm
|
||||
dependencies[] = stormorganization
|
||||
dependencies[] = stormproject
|
||||
|
|
|
@ -221,6 +221,21 @@ function stormnote_form(&$node) {
|
|||
drupal_set_breadcrumb($breadcrumb);
|
||||
|
||||
if (arg(1)=='add') {
|
||||
if (array_key_exists('parent', $_GET)) {
|
||||
$book_parent = book_link_load($_GET['parent']);
|
||||
if (isset($book_parent)) {
|
||||
$parent = node_load($book_parent['nid']);
|
||||
if (!empty($parent->organization_nid)) {
|
||||
$_GET['organization_nid'] = $parent->organization_nid;
|
||||
}
|
||||
if (!empty($parent->project_nid)) {
|
||||
$_GET['project_nid'] = $parent->project_nid;
|
||||
}
|
||||
if (!empty($parent->task_nid)) {
|
||||
$_GET['task_nid'] = $parent->task_nid;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (array_key_exists('organization_nid', $_GET) && !$node->organization_nid) {
|
||||
$node->organization_nid = $_GET['organization_nid'];
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ ul.inline li {
|
|||
list-style: none;
|
||||
}
|
||||
@media (max-width: 529px) { /* MINW = 530px */
|
||||
.node .content ul, .node .content ol {
|
||||
padding-left: 10% !important;
|
||||
.node .content td > ul, .node .content td > ol {
|
||||
padding-left: 10%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name = SuiteDesk Theme
|
||||
description = SuiteDesk Theme Zen.
|
||||
version = 0.2.55
|
||||
version = 0.2.56
|
||||
|
||||
screenshot = screenshot.png
|
||||
|
||||
|
|
Reference in a new issue