Skip to content

Commit

Permalink
groups template improved to contain a notice only
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsameer committed May 12, 2015
1 parent b2f48c8 commit 833d329
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 75 deletions.
Expand Up @@ -13,10 +13,10 @@ Group.config ["$stateProvider", "ResourcesProvider",
}).
state("groups.new",{
url: "/new",
templateUrl: template_url("auth/groups/new"),
templateUrl :template_url("auth/groups/new"),
controller: "NewGroupController"
}).
state("groups.edit",{
state("groups-edit",{
url: "/:id/edit",
templateUrl: template_url("auth/groups/new"),
controller: "AddGroupController"
Expand Down
1 change: 1 addition & 0 deletions app/controllers/faalis/dashboard_controller.rb
Expand Up @@ -18,6 +18,7 @@ def jstemplate
js_template.yellow if String.respond_to? :colorize

logger.info "#{js_template}: angular/#{params[:path]}"
puts ">>" * 100, "angular/#{params[:path]}"
render template: "angular/#{params[:path]}", layout: nil
else
render :login_required_page
Expand Down
23 changes: 2 additions & 21 deletions app/views/angular/auth/groups/details.html
@@ -1,21 +1,2 @@
<div class="details">
<p>
<b translate>Group Name :</b>{{this.object.name}}
</p>

<p>
<b translate>Permissions :</b>
<ul>
<li ng-repeat="perm in this.object.permissions">{{ perm.string_repr }}</li>
</ul>
</p>

<ul class="button-group float-right">
<a ng-href="#/auth/groups/{{ this.object.id }}/edit" class="small">
<span class="fa fa-edit"></span> <span translated>Edit</span>
</a>
<!--<a ng-href="#/auth/groups/{{ this.object.id }}" class="small">
<span class="fa fa-eye"></span><span translated>Show</span>-->
</a>
</ul>
</div>
<h1>TODO: You have to either use a template gem like 'dashstrap' or override this templates in your code base</h1>
<h2>/auth/groups/details</h2>
7 changes: 2 additions & 5 deletions app/views/angular/auth/groups/index.html
@@ -1,5 +1,2 @@
<list-view buttons="buttons" objects="groups" title-attribute="'name'" details-template="details_template" item-per-page="10" on_delete="on_delete">
<div class="small-6 column text-left clearpadding">
<h3><i class="fa fa-group"></i> <span translate>Groups</span></h3>
</div>
</list-view>
<h1>TODO: You have to either use a template gem like 'dashstrap' or override this templates in your code base</h1>
<h2>/auth/groups/index</h2>
49 changes: 2 additions & 47 deletions app/views/angular/auth/groups/new.html
@@ -1,47 +1,2 @@
<div class="newform">
<form name="from" novalidate>

<fieldset class="form">

<legend ng-if="!editing"><span translate>New Group</span></legend>
<legend ng-if="editing"><span translate>Edit Group</span></legend>

<div class="row">
<div class="small-4 columns">
<label translate>Name :</label>
<input id="id_name" ng-model="new_name" type="text" required>
<small id="id_name_msg"></small>
</div>
</div>
</fieldset>

<fieldset>
<legend translate>Advance Permissions</legend>
<div class="row">
<label for="permissions" translate>Permissions</label>
</div>

<div class="small-10 columns permissions">

<div class="row">
<div id="id_permissions" class="small-8 columns field">
<ul>

<li ng-repeat="permission in permissions" id="{{permission.name}}" ng-click="select_permission(permission)"> <i ng-show="is_selected(permission)" class="fa fa-check"></i> {{ permission.string }} </li>

</ul>
</div>
<small id="id_permissions_msg"></small>
</div>
</div>
</fieldset>

<div class="row">
<div class="small-6 columns">
<button class="btn small green" ng-click="save()" ng-disabled="form.$invalid"><i class="fa fa-check"></i> <span translate>Save</span></button>
<button class="btn small red" ng-click="cancel()"><i class="fa fa-times"></i><span translate>Cansel</span></button>
</div>
</div>
</form>

</div>
<h1>TODO: You have to either use a template gem like 'dashstrap' or override this templates in your code base</h1>
<h2>/auth/groups/new</h2>

0 comments on commit 833d329

Please sign in to comment.