Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
election
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
election
Commits
2b3a3334
Commit
2b3a3334
authored
13 years ago
by
Patrick Dawkins
Browse files
Options
Downloads
Patches
Plain Diff
Added candidate field admin.
parent
14c6d6de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
election.module
+31
-0
31 additions, 0 deletions
election.module
with
31 additions
and
0 deletions
election.module
+
31
−
0
View file @
2b3a3334
...
@@ -116,6 +116,14 @@ function election_entity_info() {
...
@@ -116,6 +116,14 @@ function election_entity_info() {
'custom settings'
=>
TRUE
,
'custom settings'
=>
TRUE
,
),
),
),
),
'bundles'
=>
array
(
'candidate'
=>
array
(
'admin'
=>
array
(
'path'
=>
'admin/election/candidate'
,
'access arguments'
=>
array
(
'administer elections'
),
),
),
),
);
);
return
$entities
;
return
$entities
;
...
@@ -618,6 +626,22 @@ function election_menu() {
...
@@ -618,6 +626,22 @@ function election_menu() {
}
}
}
}
$items
[
'admin/election/candidate'
]
=
array
(
'title'
=>
'Candidate settings'
,
'description'
=>
'Manage fields and display settings for election candidates (not applicable to referendums).'
,
'title callback'
=>
'check_plain'
,
'page callback'
=>
'system_admin_menu_block_page'
,
'file'
=>
'system.admin.inc'
,
'file path'
=>
drupal_get_path
(
'module'
,
'system'
),
'access arguments'
=>
array
(
'administer elections'
),
);
$items
[
'admin/election/candidate/settings'
]
=
array
(
'title'
=>
'Settings'
,
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'weight'
=>
0
,
);
$items
[
'election/%election'
]
=
array
(
$items
[
'election/%election'
]
=
array
(
'title callback'
=>
'election_page_title'
,
'title callback'
=>
'election_page_title'
,
'title arguments'
=>
array
(
1
),
'title arguments'
=>
array
(
1
),
...
@@ -771,6 +795,13 @@ function election_menu_alter(&$items) {
...
@@ -771,6 +795,13 @@ function election_menu_alter(&$items) {
}
}
}
}
unset
(
$items
[
'admin/election/candidate/settings'
]);
$items
[
'admin/election/candidate/fields'
][
'type'
]
=
MENU_NORMAL_ITEM
;
$items
[
'admin/election/candidate/fields'
][
'description'
]
=
t
(
'Manage fields for election candidates.'
);
$items
[
'admin/election/candidate/display'
][
'type'
]
=
MENU_NORMAL_ITEM
;
$items
[
'admin/election/candidate/display'
][
'description'
]
=
t
(
'Manage display for election candidates.'
);
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment