'use strict';

/* Filters */

angular.module('wemet.filters', []).
  filter('interpolate', ['version', function(version) {
    return function(text) {
      return String(text).replace(/\%VERSION\%/mg, version);
    };
  }])
  .filter('editOrYes', ['$rootScope', function($rootScope) {
  	return function(igo) {
  		if(igo.user === $rootScope.user) {
  			return "<a href=\"/edit\">Edit</a>";
  		}else {
  			return "<span ng-click=\"setResp($event, 'yes')\"> Yes </span>";
  		}
  	};
  }])
  .filter('deleteOrNot', ['$rootScope', function($rootScope) {
  	return function(igo) {
  		if(igo.user === $rootScope.user) {
  			return "<a href=\"/delete\">Delete</a>";
  		}else {
  			return "<span ng-click=\"setResp($event,'no')\"> No </span>";
  		}
  	};
  }])
  .filter('nothingOrMayBe', ['$rootScope', function($rootScope) {
  	return function(igo) {
  		if(igo.user === $rootScope.user) {
  			return "";
  		}else {
  			return "<span ng-click=\"setResp($event, 'myb')\"> MayBe </span>";
  		}
  	};
  }]);

@@ -404,36 +404,54 @@
 %7B%0A  %09%09%09return %22%3C
-span
+button type=%5C%22button%5C%22
  ng-click=%5C%22setR
@@ -474,16 +474,42 @@
 ')%5C%22
+ class=%5C%22btn btn-success%5C%22
 %3E Yes %3C/
 span
@@ -504,19 +504,21 @@
 %3E Yes %3C/
-spa
+butto
 n%3E%22;%0A  %09
@@ -724,36 +724,54 @@
 %7B%0A  %09%09%09return %22%3C
-span
+button type=%5C%22button%5C%22
  ng-click=%5C%22setR
@@ -792,18 +792,45 @@
 ')%5C%22
+ class=%5C%22btn btn-danger%5C%22
 %3E No %3C/
-spa
+butto
 n%3E%22;
@@ -1021,20 +1021,38 @@
 eturn %22%3C
-span
+button type=%5C%22button%5C%22
  ng-clic
@@ -1083,21 +1083,45 @@
 ')%5C%22
-%3E MayBe %3C/spa
+ class=%5C%22btn btn-warning%5C%22%3E ? %3C/butto
 n%3E%22;

change filters html to use bootstrap buttons