added blog subscriber, unsubscribe
diff --git a/erpnext/website/page/unsubscribe/__init__.py b/erpnext/website/page/unsubscribe/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/website/page/unsubscribe/__init__.py
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.html b/erpnext/website/page/unsubscribe/unsubscribe.html
new file mode 100644
index 0000000..7b2b68e
--- /dev/null
+++ b/erpnext/website/page/unsubscribe/unsubscribe.html
@@ -0,0 +1,13 @@
+<div class="layout_wrapper">
+ <div class="web-content">
+ <h1>Unsubscribe</h1>
+ <br>
+ <div class="web-main-section">
+ <input name="unsubscribe">
+ <button class="btn" id="btn-unsubscribe">Unsubscribe</button>
+ </div>
+ <div class="web-side-section">
+ </div>
+ <div style="clear: both"></div>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.js b/erpnext/website/page/unsubscribe/unsubscribe.js
new file mode 100644
index 0000000..7cbed37
--- /dev/null
+++ b/erpnext/website/page/unsubscribe/unsubscribe.js
@@ -0,0 +1,21 @@
+pscript.onload_unsubscribe = function(wrapper) {
+ var email = window.location.hash.split('/').splice(-1);
+ $(wrapper).find('input[name="unsubscribe"]').val(email)
+
+ $('#btn-unsubscribe').click(function() {
+ var email = $(wrapper).find('input[name="unsubscribe"]').val();
+ if(email) {
+ var btn = this;
+ wn.call({
+ module:'website',
+ page:'unsubscribe',
+ method:'unsubscribe',
+ args:email,
+ btn: this,
+ callback: function() {
+ $(wrapper).find('input[name="unsubscribe"]').val('');
+ }
+ });
+ }
+ });
+}
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.py b/erpnext/website/page/unsubscribe/unsubscribe.py
new file mode 100644
index 0000000..57d1d47
--- /dev/null
+++ b/erpnext/website/page/unsubscribe/unsubscribe.py
@@ -0,0 +1,8 @@
+def unsubscribe(arg):
+ """unsubscribe from lists"""
+ import webnotes
+ lists = [['Blog Subscriber', 'name']]
+ for l in lists:
+ webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
+
+ webnotes.msgprint('Unsubscribed!')
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.txt b/erpnext/website/page/unsubscribe/unsubscribe.txt
new file mode 100644
index 0000000..2cc3b58
--- /dev/null
+++ b/erpnext/website/page/unsubscribe/unsubscribe.txt
@@ -0,0 +1,43 @@
+# Page, unsubscribe
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-01-27 17:19:02',
+ 'docstatus': 0,
+ 'modified': '2012-01-27 17:19:02',
+ 'modified_by': 'Administrator',
+ 'owner': 'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': 'Website',
+ 'name': '__common__',
+ 'page_name': 'unsubscribe',
+ 'standard': 'Yes',
+ 'title': 'Unsubscribe'
+ },
+
+ # These values are common for all Page Role
+ {
+ 'doctype': 'Page Role',
+ 'name': '__common__',
+ 'parent': 'unsubscribe',
+ 'parentfield': 'roles',
+ 'parenttype': 'Page',
+ 'role': 'Guest'
+ },
+
+ # Page, unsubscribe
+ {
+ 'doctype': 'Page',
+ 'name': 'unsubscribe'
+ },
+
+ # Page Role
+ {
+ 'doctype': 'Page Role'
+ }
+]
\ No newline at end of file