Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
eb48092d
Commit
eb48092d
authored
Sep 30, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uitemplates'
parents
76fb3331
cd11a6be
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
30 deletions
+72
-30
app_routes.js
app/app_routes.js
+12
-20
crud_controller.js
app/components/crud/crud_controller.js
+2
-1
list.html
app/components/crud/templates/list.html
+4
-4
404.html
app/components/uitemplates/404.html
+11
-0
500.html
app/components/uitemplates/500.html
+9
-0
uitemplates.js
app/components/uitemplates/uitemplates.js
+28
-0
main.html
app/main.html
+2
-2
main.js
app/main.js
+1
-1
directives.js
app/shared/directives.js
+1
-1
sidebar.html
app/shared/templates/directives/sidebar.html
+2
-1
No files found.
app/app_routes.js
View file @
eb48092d
...
...
@@ -10,38 +10,30 @@ app.config(['$routeProvider', function ($routeProvider) {
templateUrl
:
'components/dashboard/dashboard.html'
,
controller
:
'DashCtrl'
})
.
when
(
'/:model/add'
,
{
.
when
(
'/500'
,
{
templateUrl
:
'components/uitemplates/500.html'
,
controller
:
'500Ctrl'
})
.
when
(
'/404'
,
{
templateUrl
:
'components/uitemplates/404.html'
,
controller
:
'404Ctrl'
})
.
when
(
'/crud/:model/add'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
})
.
when
(
'/:model/edit/:id'
,
{
.
when
(
'/
crud/
:model/edit/:id'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
})
.
when
(
'/:model'
,
{
.
when
(
'/
crud/
:model'
,
{
templateUrl
:
'components/crud/templates/list.html'
,
controller
:
'CRUDListCtrl'
})
.
when
(
'/:model/:id'
,
{
.
when
(
'/
crud/
:model/:id'
,
{
templateUrl
:
'components/crud/templates/show.html'
,
controller
:
'CRUDShowCtrl'
})
.
when
(
'/staff/add'
,
{
templateUrl
:
'components/staff/templates/add.html'
,
controller
:
'StaffAddEditCtrl'
})
.
when
(
'/staff/edit/:id'
,
{
templateUrl
:
'components/staff/templates/edit.html'
,
controller
:
'StaffAddEditCtrl'
})
.
when
(
'/staffs'
,
{
templateUrl
:
'components/staff/templates/list.html'
,
controller
:
'StaffListCtrl'
})
.
when
(
'/staff/:id'
,
{
templateUrl
:
'components/staff/templates/show.html'
,
controller
:
'StaffShowCtrl'
})
.
otherwise
({
redirectTo
:
'/dashboard'
});
}])
.
run
(
function
(
$rootScope
)
{
...
...
app/components/crud/crud_controller.js
View file @
eb48092d
...
...
@@ -38,7 +38,8 @@ crud.controller('CRUDAddEditCtrl', function ($scope, $rootScope, $location, $htt
if
(
form
.
$valid
)
{
Generator
.
submit
(
$scope
)
.
success
(
function
(
data
){
$location
.
path
(
$scope
.
form_params
.
model
).
search
(
data
);
debugger
;
$location
.
path
(
'/crud/'
+
$scope
.
form_params
.
model
).
search
(
data
);
})
.
error
(
function
(
data
){
$scope
.
message
=
data
.
title
;
...
...
app/components/crud/templates/list.html
View file @
eb48092d
<div
class=
"starter-template"
>
<h1>
{{model}}
<a
href=
"#/{{model}}/add"
><button
type=
"button"
class=
"btn btn-primary"
>
Ekle
</button></a></h1>
<h1>
{{model}}
<a
href=
"#/
crud/
{{model}}/add"
><button
type=
"button"
class=
"btn btn-primary"
>
Ekle
</button></a></h1>
<div
class=
"tablescroll"
>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<thead>
...
...
@@ -24,15 +24,15 @@
</td>
<th
scope=
"row"
style=
"text-align:center"
>
{{$index}}
</th>
<td
ng-repeat=
"k in object"
ng-if=
"nobjects[0]=='-1' && $index>0"
>
<a
ng-href=
"#/{{model}}/{{object[0]}}"
>
{{object[1]}}
</a>
<a
ng-href=
"#/
crud/
{{model}}/{{object[0]}}"
>
{{object[1]}}
</a>
</td>
<td
ng-repeat=
"(key,value) in object"
ng-if=
"nobjects[0]!='-1' && $index>0"
>
<a
ng-href=
"#/{{model}}/{{object[0]}}"
ng-if=
"$index==1"
>
{{value}}
</a>
<a
ng-href=
"#/
crud/
{{model}}/{{object[0]}}"
ng-if=
"$index==1"
>
{{value}}
</a>
<span
ng-if=
"$index!=1"
>
{{value}}
</span>
</td>
<td>
<a
ng-href=
"#/{{model}}/edit/{{object[0]}}"
>
Edit
</a><br>
<a
ng-href=
"#/
crud/
{{model}}/edit/{{object[0]}}"
>
Edit
</a><br>
</td>
</tr>
</tbody>
...
...
app/components/uitemplates/404.html
0 → 100644
View file @
eb48092d
<div
ng-app=
"ulakbus.uitemplates"
class=
"dashboard"
>
<div
class=
"starter-template"
>
<div
class=
"row"
>
<div>
404.html
</div>
</div>
</div>
</div>
\ No newline at end of file
app/components/uitemplates/500.html
0 → 100644
View file @
eb48092d
<div
ng-app=
"ulakbus.uitemplates"
class=
"dashboard"
>
<div
class=
"starter-template"
>
<div
class=
"row"
>
<div>
500.html
</div>
</div>
</div>
</div>
\ No newline at end of file
app/components/uitemplates/uitemplates.js
0 → 100644
View file @
eb48092d
/**
* Copyright (C) 2015 ZetaOps Inc.
*
* This file is licensed under the GNU General Public License v3
* (GPLv3). See LICENSE.txt for details.
*/
'use strict'
;
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/500'
,
{
templateUrl
:
'components/uitemplates/500.html'
,
controller
:
'500Ctrl'
})
.
when
(
'/404'
,
{
templateUrl
:
'components/uitemplates/404.html'
,
controller
:
'404Ctrl'
});
}]);
angular
.
module
(
'ulakbus.uitemplates'
,
[
'ngRoute'
])
.
controller
(
'500Ctrl'
,
function
(
$scope
,
$rootScope
,
$location
)
{
})
.
controller
(
'400Ctrl'
,
function
(
$scope
,
$rootScope
,
$location
)
{
});
\ No newline at end of file
app/main.html
View file @
eb48092d
...
...
@@ -107,8 +107,8 @@
<script
src=
"components/auth/auth_service.js"
></script>
<script
src=
"components/dashboard/dashboard_controller.js"
></script>
<script
src=
"components/crud/crud_controller.js"
></script>
<script
src=
"components/
staff/staff_controller
.js"
></script>
<
script
src=
"components/student/student_controller.js"
></script
>
<script
src=
"components/
uitemplates/uitemplates
.js"
></script>
<
!--<script src="components/student/student_controller.js"></script>--
>
<script
src=
"components/version/interpolate-filter.js"
></script>
<script
src=
"components/version/version-directive.js"
></script>
<script
src=
"components/version/version.js"
></script>
...
...
app/main.js
View file @
eb48092d
...
...
@@ -28,7 +28,7 @@ var app = angular.module(
'templates-prod'
,
// @endif
// @if NODE_ENV='DEVELOPMENT'
//'templates-dev
',
'ulakbus.uitemplates
'
,
// @endif
]).
/**
...
...
app/shared/directives.js
View file @
eb48092d
...
...
@@ -70,7 +70,7 @@ app.directive('sidebar', ['$location', function () {
// at start define breadcrumblinks for breadcrumb
angular
.
forEach
(
data
.
app_models
,
function
(
value
,
key
)
{
angular
.
forEach
(
value
[
1
],
function
(
v
,
k
)
{
if
(
v
[
1
]
==
$location
.
path
().
split
(
'/'
)[
1
])
{
if
(
v
[
1
]
==
$location
.
path
().
split
(
'/'
)[
2
])
{
$rootScope
.
breadcrumblinks
=
[
value
[
0
],
v
[
0
]];
$scope
.
menuItems
=
[
$scope
.
allMenuItems
[
key
]];
}
else
{
...
...
app/shared/templates/directives/sidebar.html
View file @
eb48092d
...
...
@@ -13,7 +13,8 @@
<a
href=
""
ng-click=
"check($index+1)"
><i
class=
"fa fa-wrench fa-fw"
></i>
{{ item[0] }}
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li
ng-repeat=
"(k, v) in item[1]"
><a
href=
"#/{{v[1]}}"
ng-click=
"breadcrumb([item[0], v[0]])"
>
{{v[0]}}
</a></li>
<li
ng-repeat=
"(k, v) in item[1]"
><a
href=
"#/crud/{{v[1]}}"
ng-click=
"breadcrumb([item[0], v[0]])"
>
{{v[0]}}
</a></li>
</ul>
<!-- /.nav-second-level -->
</li>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment