with gmail widget..
This commit is contained in:
1 parent
a298cbd5f6
commit
64be61d61b
6 files changed
+102
-2
No files matched your search
@@ -1,7 +1,8 @@
|
||||
|
||||
class DesktopController< ApplicationController
|
||||
layout 'desktop'
|
||||
before_filter :authenticate_user!
|
||||
|
||||
|
||||
#to load pages...
|
||||
|
||||
def index
|
||||
@@ -22,6 +23,7 @@ class DesktopController< ApplicationController
|
||||
def sections
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def settings
|
||||
render :layout => false
|
||||
end
|
||||
@@ -181,4 +183,10 @@ class DesktopController< ApplicationController
|
||||
render :json=>b.to_json
|
||||
end
|
||||
|
||||
def forgmail
|
||||
|
||||
feed = Net::HTTP.get_response(URI.parse("https://mail.google.com/mail/feed/atom")).body
|
||||
render :xml=>feed
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,21 @@
|
||||
class UselessController< ApplicationController
|
||||
require 'open-uri'
|
||||
require 'rexml/document'
|
||||
require 'net/http'
|
||||
require 'net/https'
|
||||
include REXML
|
||||
|
||||
def forgmail
|
||||
url = URI.parse("https://mail.google.com/mail/feed/atom")
|
||||
req = Net::HTTP::Get.new(url.path)
|
||||
req.basic_auth params['username'], params['password']
|
||||
req.content_type = 'text/xml'
|
||||
|
||||
http = Net::HTTP.new(url.host, url.port)
|
||||
http.use_ssl = true
|
||||
response = http.start { |http| http.request(req) }
|
||||
|
||||
root = Document.new(response.read_body).root
|
||||
render :text=>root
|
||||
end
|
||||
end
|
||||
@@ -3,7 +3,7 @@
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">Journal Pages</span>
|
||||
<span class="thmtxth">Journal Papers</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
|
||||
Reference in new issue
Block a user