Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Improve first contact: add invite after setup #487

Merged
merged 2 commits into from
Jun 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/javascripts/ng-admin/Crud/delete/DeleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ define(function () {
this.actions = view.actions();
this.entity = view.getEntity();
this.notification = notification;

this.$scope.entry = entry;
this.$scope.view = view;
$scope.$on('$destroy', this.destroy.bind(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ define(function (require) {
this.PanelBuilder.getPanelsData(this.sortField, this.sortDir).then(function (panels) {
self.panels = panels;
});
this.hasEntities = this.PanelBuilder.hasEntities();
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ function PanelBuilder($q, $location, ReadQueries, Configuration, AdminDescriptio
this.Configuration = Configuration();
}

PanelBuilder.prototype.hasEntities = function() {
return this.Configuration.entities.length > 0;
}

/**
* Returns all elements of each dashboard panels
*
Expand Down
11 changes: 10 additions & 1 deletion src/javascripts/ng-admin/Main/view/dashboard.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="row">
<div class="row" ng-if="dashboardController.hasEntities">
<div class="col-lg-12">
<div class="page-header">
<h1>Dashboard</h1>
Expand Down Expand Up @@ -34,3 +34,12 @@ <h1>Dashboard</h1>
</div>
</div>
</div>

<div class="row" ng-if="!dashboardController.hasEntities">
<div class="col-lg-12">
<div class="dashboard-invite">
<p>All dependencies are set, ng-admin is ready to run!</p>
<p>Now you can <a href="https://github.com/marmelab/ng-admin/blob/master/README.md#configuring-ng-admin">update the configuration</a>: add entities to the admin, then refresh.</p>
</div>
</div>
</div>
11 changes: 11 additions & 0 deletions src/sass/ng-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ ul.collapsible {
}
}

.dashboard-invite {
margin: 3em;
padding: 1em;
text-align: center;
background-color: #DFF0D8;
p {
padding: .5em;
margin: 0;
}
}

/**
* Grid
*/
Expand Down