This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
forked from kristofvanroy/nice-dash
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed submit bug and User Plugin initial commit
- Loading branch information
1 parent
34b6248
commit bbdb785
Showing
5 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name = Nice Dash User Plugin | ||
description = User widgets for Nice Dash | ||
package = Nice dashboard | ||
dependencies[] = nice_dash | ||
core = 6.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* Implementation of hook_views_api(). | ||
*/ | ||
function nice_dash_user_views_api() { | ||
return array( | ||
'api' => 2, | ||
'path' => drupal_get_path('module', 'nice_dash_user'), | ||
); | ||
} | ||
|
||
/** | ||
* Implementation of hook_nice_dash_widgets() | ||
*/ | ||
function nice_dash_user_nice_dash_widgets(){ | ||
module_load_include('inc', 'nice_dash_user', 'nice_dash_user.widgets'); | ||
|
||
$widgets['user_latest'] = array( | ||
'title' => t('Latest registered users'), | ||
'callback' => 'nice_dash_user_widget_latest', | ||
//'file' => 'nice_dash_content.widgets.inc' | ||
); | ||
|
||
return $widgets; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
/** | ||
* Implementation of hook_views_default_views(). | ||
*/ | ||
function nice_dash_user_views_default_views() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
/** | ||
* Callback for the Nice Dash: unpublish widget | ||
*/ | ||
function nice_dash_user_widget_latest(){ | ||
$output .= '<div class="admin-panel">'; | ||
$output .= '<h3>'.t('Latest registered users').'</h3>'; | ||
$output .= views_embed_view('nice_dash_user','block_1'); | ||
$output .= '</div>'; | ||
|
||
return $output; | ||
|
||
} |