2013-04-05 07:51:53 +02:00
< div ng-controller = "SubscribeCtrl" >
2013-03-25 12:24:00 +01:00
< div class = "btn-group" >
2013-04-14 18:27:01 +02:00
< button class = "btn" ng-click = "open()" > < span class = "openwebicons-feed-simple" > < / span > Subscribe< / button >
2013-03-25 12:24:00 +01:00
< button class = "btn dropdown-toggle" data-toggle = "dropdown" >
< span class = "caret" > < / span >
< / button >
< ul class = "dropdown-menu" >
2013-04-06 19:04:51 +02:00
< li > < a ng-click = "openImport()" > < i class = "icon-arrow-down" > < / i > Import< / a > < / li >
< li > < a ng-click = "openCategory()" > < i class = "icon-plus" > < / i > Add a category< / a > < / li >
2013-03-25 12:24:00 +01:00
< / ul >
< / div >
2013-03-24 13:11:05 +01:00
< div modal = "isOpen" close = "close()" options = "opts" >
< div class = "modal-header" >
< button type = "button" class = "close" ng-click = "close()" > × < / button >
< h4 > Subscribe< / h4 >
< / div >
2013-03-29 16:45:26 +01:00
< form name = "subscribeForm" class = "form-horizontal" ng-submit = "save()" >
< div class = "modal-body" >
< div class = "control-group" ng-class = "{error : !subscribeForm.url.$valid}" >
< label class = "control-label" > Feed URL< / label >
< div class = "controls" >
2013-03-30 20:51:51 +01:00
< input type = "text" name = "url" ng-model = "sub.url" ng-blur = "urlChanged()" placeholder = "http://example.com/feed" class = "input-block-level" required > < / input >
2013-03-29 16:45:26 +01:00
< span class = "help-block" ng-show = "!subscribeForm.url.$valid" > Required< / span >
< / div >
2013-03-24 13:11:05 +01:00
< / div >
2013-03-29 16:45:26 +01:00
< div class = "control-group" ng-class = "{error : !subscribeForm.title.$valid}" >
< label class = "control-label" > Feed Name< / label >
< div class = "controls" >
< input type = "text" name = "title" ng-model = "sub.title" class = "input-block-level" required > < / input >
< span class = "help-block" ng-show = "!subscribeForm.title.$valid" > Required< / span >
< / div >
2013-03-24 13:11:05 +01:00
< / div >
2013-03-29 16:45:26 +01:00
< div class = "control-group" ng-class = "{error : !subscribeForm.category.$valid}" >
< label class = "control-label" > Category< / label >
< div class = "controls" >
< select name = "category" ng-model = "sub.categoryId" class = "input-block-level" required >
< option ng-repeat = "cat in SubscriptionService.flatCategories" value = "{{cat.id}}" > {{cat.name}}< / option >
< / select >
< span class = "help-block" ng-show = "!subscribeForm.category.$valid" > Required< / span >
< / div >
2013-03-24 13:11:05 +01:00
< / div >
< / div >
2013-03-31 08:56:36 +02:00
< div class = "modal-footer" >
2013-04-10 09:03:55 +02:00
< button class = "btn cancel" ng-click = "close()" type = "button" > Cancel< / button >
2013-03-31 08:56:36 +02:00
< button class = "btn btn-primary ok" type = "submit" > Save< / button >
< / div >
2013-03-29 16:45:26 +01:00
< / form >
2013-03-24 13:11:05 +01:00
< / div >
2013-03-25 12:24:00 +01:00
< div modal = "isOpenImport" close = "closeImport()" options = "opts" >
< div class = "modal-header" >
< button type = "button" class = "close" ng-click = "closeImport()" > × < / button >
< h4 > Import< / h4 >
< / div >
< form ng-upload class = "form-horizontal" action = "rest/subscriptions/import" >
< div class = "modal-body" >
< div class = "control-group" >
2013-04-06 19:04:51 +02:00
< div > Let me import your feeds from your
< a href = "google/import/redirect" >
2013-04-10 16:36:31 +02:00
< img src = "images/google_reader_icon.png" class = "favicon" / >
2013-04-06 19:04:51 +02:00
Google Reader account
< / a > .
< / div >
< div > Alternatively, upload your subscriptions.xml file (download it from < a target = "_blank" href = "https://www.google.com/reader/subscriptions/export" > here)< / a > .< / div >
2013-03-25 12:24:00 +01:00
< / div >
< div class = "control-group" >
< label class = "control-label" > XML File< / label >
< div class = "controls" >
< input type = "file" name = "file" > < / input >
< / div >
< / div >
< / div >
< div class = "modal-footer" >
2013-03-31 08:17:28 +02:00
< button type = "button" class = "btn cancel" ng-click = "closeImport()" > Cancel< / button >
2013-03-25 12:24:00 +01:00
< button class = "btn btn-primary ok" type = "submit" upload-submit = "uploadComplete(contents, completed)" > Import< / button >
< / div >
< / form >
< / div >
2013-03-31 08:17:28 +02:00
< div modal = "isOpenCategory" close = "closeCategory()" options = "opts" >
< div class = "modal-header" >
< button type = "button" class = "close" ng-click = "closeCategory()" > × < / button >
< h4 > New category< / h4 >
< / div >
< form name = "categoryForm" class = "form-horizontal" ng-submit = "saveCategory()" >
< div class = "modal-body" >
< div class = "control-group" ng-class = "{error : !categoryForm.name.$valid}" >
< label class = "control-label" > Name< / label >
< div class = "controls" >
< input type = "text" name = "name" ng-model = "cat.name" required > < / input >
< span class = "help-block" ng-show = "!categoryForm.name.$valid" > Required< / span >
< / div >
< / div >
< div class = "control-group" ng-class = "{error : !categoryForm.category.$valid}" >
2013-04-09 16:51:40 +02:00
< label class = "control-label" > Parent< / label >
2013-03-31 08:17:28 +02:00
< div class = "controls" >
< select name = "category" ng-model = "cat.parentId" class = "input-block-level" required >
< option ng-repeat = "cat in SubscriptionService.flatCategories" value = "{{cat.id}}" > {{cat.name}}< / option >
< / select >
< span class = "help-block" ng-show = "!categoryForm.category.$valid" > Required< / span >
< / div >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn cancel" ng-click = "closeCategory()" > Cancel< / button >
< button class = "btn btn-primary ok" type = "submit" > Save< / button >
< / div >
< / form >
< / div >
2013-03-24 13:11:05 +01:00
< / div >