summaryrefslogtreecommitdiffstats
path: root/install/ui/entitle.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/entitle.js')
-rw-r--r--install/ui/entitle.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/install/ui/entitle.js b/install/ui/entitle.js
index 4c9cd13c6..17be45835 100644
--- a/install/ui/entitle.js
+++ b/install/ui/entitle.js
@@ -56,6 +56,11 @@ IPA.entity_factories.entitle = function() {
{
name: 'end',
label: 'End'
+ },
+ {
+ factory: IPA.entitle.certificate_column,
+ name: 'certificate',
+ label: 'Certificate'
}
]
}).
@@ -404,6 +409,36 @@ IPA.entitle.search_facet = function(spec) {
return that;
};
+IPA.entitle.certificate_column = function(spec) {
+
+ spec = spec || {};
+
+ var that = IPA.column(spec);
+
+ that.setup = function(container, record) {
+ container.empty();
+
+ var certificate = record[that.name];
+
+ $('<a/>', {
+ 'href': '#download',
+ 'html': 'Download',
+ 'click': function() {
+ var dialog = IPA.cert.download_dialog({
+ title: 'Download Certificate',
+ certificate: certificate,
+ add_pem_delimiters: false
+ });
+ dialog.init();
+ dialog.open();
+ return false;
+ }
+ }).appendTo(container);
+ };
+
+ return that;
+};
+
IPA.entitle.certificate_dialog = function(spec) {
spec = spec || {};
@@ -542,4 +577,4 @@ IPA.entitle.import_dialog = function(spec) {
});
return that;
-}; \ No newline at end of file
+};