From: Bill Erickson Date: Mon, 12 May 2014 15:26:32 +0000 (-0400) Subject: file / directory name improvements and cleanup X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3f25148c622b14ad022de5b1920e44ed1e5063f8;p=working%2FEvergreen.git file / directory name improvements and cleanup * remove t_ prefix from TT-loaded template files (not needed). * rename "parts" to "share", which better describes the contents * remove deprecated column_picker template Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/admin/workstation/index.tt2 b/Open-ILS/src/templates/staff/admin/workstation/index.tt2 index daf08b774a..2d955ec4ee 100644 --- a/Open-ILS/src/templates/staff/admin/workstation/index.tt2 +++ b/Open-ILS/src/templates/staff/admin/workstation/index.tt2 @@ -1,5 +1,5 @@ [% - WRAPPER "staff/t_base.tt2"; + WRAPPER "staff/base.tt2"; ctx.page_title = l("Workstation Administration"); ctx.page_app = "egWorkstationAdmin"; %] diff --git a/Open-ILS/src/templates/staff/base.tt2 b/Open-ILS/src/templates/staff/base.tt2 new file mode 100644 index 0000000000..5a361b2697 --- /dev/null +++ b/Open-ILS/src/templates/staff/base.tt2 @@ -0,0 +1,47 @@ + +[%- + EVERGREEN_VERSION='0.0.1' + + # create script / css refs to individual files instead of using + EXPAND_WEB_IMPORTS=1; +%] + + + [% l('Evergreen Staff [_1]', ctx.page_title) %] + + + + + [% IF EXPAND_WEB_IMPORTS %] + + + [% ELSE %] + + [% END %] + + + + + + + + + +
[% content %]
+ [% + # status bar along bottom of page + INCLUDE "staff/statusbar.tt2"; + + # script imports + INCLUDE "staff/base_js.tt2"; + + # App-specific JS load commands go into an APP_JS block. + PROCESS APP_JS; + %] + + + diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2 new file mode 100644 index 0000000000..e56cf474c0 --- /dev/null +++ b/Open-ILS/src/templates/staff/base_js.tt2 @@ -0,0 +1,46 @@ + + +[% IF EXPAND_WEB_IMPORTS %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[% ELSE %] + + + + +[% END %] + + + diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 index f92c4aa3b1..2f21e7258c 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 @@ -1,5 +1,5 @@ [% - WRAPPER "staff/t_base.tt2"; + WRAPPER "staff/base.tt2"; ctx.page_title = l("Record Buckets"); ctx.page_app = "egCatRecordBuckets"; ctx.page_ctrl = "RecordBucketCtrl"; diff --git a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 index ef7d5a37bb..ea5d58c4ac 100644 --- a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 @@ -1,5 +1,5 @@ [% - WRAPPER "staff/t_base.tt2"; + WRAPPER "staff/base.tt2"; ctx.page_title = l("Check In"); ctx.page_app = "egCheckinApp"; ctx.page_ctrl = "CheckinCtrl"; diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2 index 551b07d56a..f3f80cae4a 100644 --- a/Open-ILS/src/templates/staff/circ/patron/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2 @@ -1,5 +1,5 @@ [% - WRAPPER "staff/t_base.tt2"; + WRAPPER "staff/base.tt2"; ctx.page_title = l("Patron"); ctx.page_app = "egPatronApp"; ctx.page_ctrl = "PatronCtrl"; diff --git a/Open-ILS/src/templates/staff/index.tt2 b/Open-ILS/src/templates/staff/index.tt2 index 478ff2f755..b2e25f8782 100644 --- a/Open-ILS/src/templates/staff/index.tt2 +++ b/Open-ILS/src/templates/staff/index.tt2 @@ -1,5 +1,5 @@ [% - WRAPPER "staff/t_base.tt2"; + WRAPPER "staff/base.tt2"; ctx.page_title = l("Home"); ctx.page_app = "egHome"; %] diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 new file mode 100644 index 0000000000..b6dea13032 --- /dev/null +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -0,0 +1,153 @@ + + + + + diff --git a/Open-ILS/src/templates/staff/parts/column_picker.tt2 b/Open-ILS/src/templates/staff/parts/column_picker.tt2 deleted file mode 100644 index 49bd38e0a6..0000000000 --- a/Open-ILS/src/templates/staff/parts/column_picker.tt2 +++ /dev/null @@ -1,43 +0,0 @@ - -[%# -Must be wrapped in a btn-group/text-left div for correct display. -It's not done here since the caller may wish to add other buttons/ -dropdowns, etc. to the btn-group - -
- [ INCLUDE 'staff/parts/column_picker.tt2' listname=somelist ] -
-%] - - - diff --git a/Open-ILS/src/templates/staff/parts/statusbar.tt2 b/Open-ILS/src/templates/staff/parts/statusbar.tt2 deleted file mode 100644 index 7eef88b5d8..0000000000 --- a/Open-ILS/src/templates/staff/parts/statusbar.tt2 +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/Open-ILS/src/templates/staff/parts/t_alert_dialog.tt2 b/Open-ILS/src/templates/staff/parts/t_alert_dialog.tt2 deleted file mode 100644 index b71614a32a..0000000000 --- a/Open-ILS/src/templates/staff/parts/t_alert_dialog.tt2 +++ /dev/null @@ -1,16 +0,0 @@ - -
- - - -
diff --git a/Open-ILS/src/templates/staff/parts/t_autogrid.tt2 b/Open-ILS/src/templates/staff/parts/t_autogrid.tt2 deleted file mode 100644 index 4e037ade91..0000000000 --- a/Open-ILS/src/templates/staff/parts/t_autogrid.tt2 +++ /dev/null @@ -1,260 +0,0 @@ - - - -
- -
-
{{mainLabel}}
-
- -
- - -
- - -
- - - - - - - - - - - - -
- - -
- -
- - -
- -
- - -
- - -
-
- - -
- - -
- -
-
-
[% l('#') %]
-
-
-
- -
-
-
- -
-
- -
-
{{col.label}}
-
-
-
 
-
-
-
- - -
-
-
[% l('Expand') %]
-
[% l('Shrink') %]
-
[% l('Sort') %]
-
-
-
- - - -
-
- - - -
-
-
- -
-
-
-
- -
-
[% l('No Items To Display') %]
- -
-
- {{$index + offset() + 1}} -
-
- -
- -
-
-
- {{itemFieldValue(item, col)}} -
-
-
- - -
- diff --git a/Open-ILS/src/templates/staff/parts/t_confirm_dialog.tt2 b/Open-ILS/src/templates/staff/parts/t_confirm_dialog.tt2 deleted file mode 100644 index 45e8ca1609..0000000000 --- a/Open-ILS/src/templates/staff/parts/t_confirm_dialog.tt2 +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - -
diff --git a/Open-ILS/src/templates/staff/share/README b/Open-ILS/src/templates/staff/share/README new file mode 100644 index 0000000000..bcbddf563f --- /dev/null +++ b/Open-ILS/src/templates/staff/share/README @@ -0,0 +1,5 @@ +Location for globally shared template files. These are generally used +by AngularJS directives. + +App-specific shared templates should live within the application's +directory. diff --git a/Open-ILS/src/templates/staff/share/t_alert_dialog.tt2 b/Open-ILS/src/templates/staff/share/t_alert_dialog.tt2 new file mode 100644 index 0000000000..b71614a32a --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_alert_dialog.tt2 @@ -0,0 +1,16 @@ + +
+ + + +
diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 new file mode 100644 index 0000000000..4e037ade91 --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -0,0 +1,260 @@ + + + +
+ +
+
{{mainLabel}}
+
+ +
+ + +
+ + +
+ + + + + + + + + + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + +
+ + +
+ +
+
+
[% l('#') %]
+
+
+
+ +
+
+
+ +
+
+ +
+
{{col.label}}
+
+
+
 
+
+
+
+ + +
+
+
[% l('Expand') %]
+
[% l('Shrink') %]
+
[% l('Sort') %]
+
+
+
+ + + +
+
+ + + +
+
+
+ +
+
+
+
+ +
+
[% l('No Items To Display') %]
+ +
+
+ {{$index + offset() + 1}} +
+
+ +
+ +
+
+
+ {{itemFieldValue(item, col)}} +
+
+
+ + +
+ diff --git a/Open-ILS/src/templates/staff/share/t_confirm_dialog.tt2 b/Open-ILS/src/templates/staff/share/t_confirm_dialog.tt2 new file mode 100644 index 0000000000..45e8ca1609 --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_confirm_dialog.tt2 @@ -0,0 +1,18 @@ + +
+ + + +
diff --git a/Open-ILS/src/templates/staff/statusbar.tt2 b/Open-ILS/src/templates/staff/statusbar.tt2 new file mode 100644 index 0000000000..7eef88b5d8 --- /dev/null +++ b/Open-ILS/src/templates/staff/statusbar.tt2 @@ -0,0 +1,33 @@ + + + diff --git a/Open-ILS/src/templates/staff/t_base.tt2 b/Open-ILS/src/templates/staff/t_base.tt2 deleted file mode 100644 index c9a8d95eb2..0000000000 --- a/Open-ILS/src/templates/staff/t_base.tt2 +++ /dev/null @@ -1,47 +0,0 @@ - -[%- - EVERGREEN_VERSION='0.0.1' - - # create script / css refs to individual files instead of using - EXPAND_WEB_IMPORTS=1; -%] - - - [% l('Evergreen Staff [_1]', ctx.page_title) %] - - - - - [% IF EXPAND_WEB_IMPORTS %] - - - [% ELSE %] - - [% END %] - - - - - - - - - -
[% content %]
- [% - # status bar along bottom of page - INCLUDE "staff/parts/statusbar.tt2"; - - # script imports - INCLUDE "staff/t_base_js.tt2"; - - # App-specific JS load commands go into an APP_JS block. - PROCESS APP_JS; - %] - - - diff --git a/Open-ILS/src/templates/staff/t_base_js.tt2 b/Open-ILS/src/templates/staff/t_base_js.tt2 deleted file mode 100644 index e56cf474c0..0000000000 --- a/Open-ILS/src/templates/staff/t_base_js.tt2 +++ /dev/null @@ -1,46 +0,0 @@ - - -[% IF EXPAND_WEB_IMPORTS %] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[% ELSE %] - - - - -[% END %] - - - diff --git a/Open-ILS/src/templates/staff/t_navbar.tt2 b/Open-ILS/src/templates/staff/t_navbar.tt2 deleted file mode 100644 index b6dea13032..0000000000 --- a/Open-ILS/src/templates/staff/t_navbar.tt2 +++ /dev/null @@ -1,153 +0,0 @@ - - - - - diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index dad5239643..360ac91efe 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -69,7 +69,7 @@ angular.module('egGridMod', }, // TODO: avoid hard-coded url - templateUrl : '/eg/staff/parts/t_autogrid', + templateUrl : '/eg/staff/share/t_autogrid', link : function(scope, element, attrs) { // link() is called after page compilation, which means our diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index f76f1cbf47..8605e26eea 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -91,7 +91,7 @@ function($modal , $interpolate) { service.open = function(message, msg_scope) { return $modal.open({ - templateUrl: './parts/t_alert_dialog', + templateUrl: './share/t_alert_dialog', controller: ['$scope', '$modalInstance', function($scope, $modalInstance) { $scope.message = $interpolate(message)(msg_scope); @@ -119,7 +119,7 @@ function($modal, $interpolate) { service.open = function(title, message, msg_scope) { return $modal.open({ - templateUrl: './parts/t_confirm_dialog', + templateUrl: './share/t_confirm_dialog', controller: ['$scope', '$modalInstance', function($scope, $modalInstance) { $scope.title = $interpolate(title)(msg_scope);