1. Aaron Zinman
  2. Konbit

Commits

kon...@konbit-vm.media.mit.edu  committed 142acdd

better search ui, abilty to view single resume by url

  • Participants
  • Parent commits bd7e119
  • Branches default

Comments (0)

Files changed (11)

File search/.server.py.swp

Binary file added.

File search/model.py

View file
         person['name'] = names[person['key']]
         person['location'] = locations[person['key']]
 
+
     return people
 
   def tags(self):

File search/server.py

View file
 class Resume(BaseHandler):
   def get(self):
     asterisk_id = self.get_argument("asteriskID",-1)
+    render = self.get_argument("render",-1)
     if asterisk_id < 0: return
 
     conn = pymongo.Connection(options.mongo_host, options.mongo_port)
 
     person['categories'] = categories
 
-    self.write(json.dumps(person, default=pymongo.json_util.default))
+    if render > 0:
+      self.render("resume.html",asterisk_id=person['asterisk_id'],person=json.dumps(person, default=pymongo.json_util.default))
+    else:
+      self.write(json.dumps(person, default=pymongo.json_util.default))
 
 
 # ==========
     user = self.get_current_user()
     if not user:
       self.redirect("/search/apply")
-    elif user["email"].lower() not in ['gelliott@gmail.com','greg','azinman@gmail.com', "aaron@azinman.com","jpoteau@gmail.com","recrutement.irc@gmail.fr","fwilliams9576@wvi.org","marielyne.thomas@concern.net","MarieLyne.Thomas@concern.net"]:
+    elif user["email"].lower() not in ['gelliott@gmail.com','greg','azinman@gmail.com', "aaron@azinman.com","jpoteau@gmail.com","recrutement.irc@gmail.fr","fwilliams9576@wvi.org","marielyne.thomas@concern.net","MarieLyne.Thomas@concern.net","hbrstaffing@gmail.com"]:
       self.response.out.write("Sorry, you're not authorized to use konbit at this time. <a href='/search/logout'>Go back</a>")
       return None
 
 
 
 class TopLocations(BaseHandler):
-  @tornado.web.authenticated
+  #@tornado.web.authenticated
   def get(self):
     topLocations = Model.instance().topLocations()
     self.write(json_encode(topLocations))
     db = Model.instance()
     data = db.searchQuerySolr(self.get_argument('searchStrings',"*"), \
                               self.get_argument('location',"*"))
-    #sortedData = sorted(data, key=lambda x: len(x["details"]), reverse=True)
-    sortedData = data
+    sortedData = sorted(data, key=lambda x: len(x["text_en"]), reverse=True)
 
     self.write(json_encode(sortedData))
 
 class Tags(BaseHandler):
-  @tornado.web.authenticated
+  #@tornado.web.authenticated
   def get(self):
     self.write(json_encode(Model.instance().tags()))
 

File search/static/css/screen.css

View file
 
 #searchResults .number {
 float:left;
+font-family:'TeXGyreAdventorBold';
 font-size:55px;
-color:#fff;
-width:80px;
-margin-top:10px;
+color:#444;
+margin-right:10px;
 }
 
 #searchResults .resume {
-float:left;
+float:right;
 width:80px;
 margin-top:7px;
 }
 }
 
 #searchResults .person {
+}
+
+#searchResults .person .info {
 float:left;
 width:500px;
-margin-bottom:20px;
+margin-bottom:40px;
 margin-left:15px;
+margin-top:5px;
 }
 
-#searchResults .person .name {
+#searchResults .person .name a:link {
 color:#fff;
 font-weight:bold;
 font-size:18px;
 line-height:25px;
 }
 
+#searchResults .person .location {
+  font-size:14px;
+  margin-bottom:10px;
+}
+
 #searchResults .person .tags span{
   font-size:14px;
 }
   font-size:14px;
   color:#aaa;
   font-family:'TeXGyreHerosItalic';
+  line-height:1.4em;
 }
 
 #searchResults .person .details {
 font-weight:normal;
 text-transform:normal;
 line-height:25px;
-font-size:14px;
+font-size:18px;
 width:720px;
+margin-bottom:10px;
+margin-top:20px;
+font-style:italic;
 }
 
-#searchResults .person .details .categoryName {
+#searchResults .person .quote {
+font-size:25px;
+}
+
+#searchResults .person .categoryName {
+margin-top:15px;
 font-style:italic;
+font-weight:normal;
 color:#bbb;
 }
 

File search/static/images/quote-left.png

Added
New image

File search/static/images/quote-right.png

Added
New image

File search/static/js/.search.js.swp

Binary file added.

File search/static/js/search.js

View file
     $searchResult.find(".resume a").attr("href","#resumeZoom" + person.asteriskID);
     $searchResult.find(".resumeZoom").attr("id","resumeZoom" + person.asteriskID);
 
-    $searchResult.find(".name").text(person.name + ", " + person.location);
-    if (person.tags.length > 0) $searchResult.find(".tags").text("KEYWORDS :: " + person.tags);
-    $searchResult.find(".details").append(person.text_en);
-    $searchResult.find(".categoryName").append(person.category + "&nbsp;&nbsp;");
+    $searchResult.find(".number").text(number);
+    $searchResult.find(".name a").text(person.name);
+    $searchResult.find(".name a").attr("href","javascript:window.open('/search/resume?asteriskID=" + person.asteriskID + "&render=1');")
+    $searchResult.find(".location").text(person.location);
+    $searchResult.find(".location").text(person.location);
+    if (person.tags.length > 0) $searchResult.find(".tags").append("Additional keywords: " + person.tags);
+    $searchResult.find(".details").append(person.text_en + "<img src='static/images/quote-right.png'>");
+    $searchResult.find(".categoryName").append("Category: " + person.category + "<br> ");
     $searchResult.addClass("searchResult");
     $searchResult.find(".recording div").attr("id","recording-" + person.key);
     $searchResult.find(".recording div").bind("click", {"person":person}, function() {

File search/static/konbit-video.mov

Binary file added.

File search/templates/index.html

View file
           </div>
           <div class='resumeZoom'></div>
           <div class='person'>
-            <div class='name'></div>
-            <div class='tags'></div>
-            <div class='details'><span class='categoryName'></span></div>
-            <div class='recording'><div id='recording-'><img src='static/images/recording-play-button.png'></div></div>
-            <div class='previousJobs'></div>
+            <div class='number'></div>
+            <div class="info">
+		    <div class='name'><a href="#"></a></div>
+		    <div class='location'></div>
+		    <div class='details'><img src='static/images/quote-left.png'></div>
+		    <div class='tags'><span class='categoryName'></span></div>
+		    <div class='recording'><div id='recording-'><img src='static/images/recording-play-button.png'></div></div>
+		    <div class='previousJobs'></div>
+            </div>
           </div>
-          <a href="#" class='button'>Recruit</a>
+          <!--<a href="#" class='button'>Open resume in new window</a>-->
           <div class='clear'></div>
         </div>
 

File search/templates/resume.html

View file
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+    <title>Konbit - Search and hear the skills of Haiti</title>
+
+    <link rel="stylesheet" href="static/css/helvetica1/stylesheet.css" />
+    <link rel="stylesheet" href="static/css/helvetica2/stylesheet.css" />
+    <link rel="stylesheet" href="http://konbit.media.mit.edu/css/konbit.css" />
+    <link rel="stylesheet" href="static/css/screen.css" />
+    <link rel="stylesheet" href="static/js/autocomplete/jquery.autocomplete.css" />
+
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
+    <script src="static/js/timers.js"></script>
+    <script src="static/js/debug.js"></script>
+    <script src='static/js/jquery.color.js'></script>
+    <script src='static/js/highlight.js'></script>
+    <script src='static/js/jquery.hotkeys.js'></script>
+    <script src='static/js/underscore.js'></script>
+    <script src='static/js/fancyzoom.js'></script>
+    <script src="static/js/swfobject.js"></script>
+    <script src="static/audio-player/audio-player-uncompressed.js"></script>
+    <script src="static/js/search.js"></script>
+
+    <script>
+      search.person = {{person}};
+      search.showResume(search.person.asterisk_id);
+    </script>
+
+  </head>
+
+  <body>
+    <div id="outerContainer">
+    <div id="container">
+      <div id="logoImage"><a href="/"><img src="static/images/logo5-dark.png"></a></div>
+      <div id="slogan">Search and hear the skills of Haiti.</div>
+        <div id="resumeZoom{{asterisk_id}}" style="background:#fff; width:815px; padding:20px;"></div>
+        <div id="resumePrototype" class="resumeFull" style="display:none">
+          <div class='disclaimer'>Generated by Konbit</div>
+          <div class='name'></div>
+          <div class='location'></div>
+          <div class='phone'></div>
+          <div class='categories'></div>
+          <div class='clear'></div>
+        </div>
+
+        <div id="resumeCategoryPrototype" class="resumeCategory" style="display:none">
+          <div class='name'></div>
+          <div class='details'></div>
+          <div class='recording'><div id='recording-' onclick="search.playResumeAudio(this)"><img
+              src='static/images/recording-play-button-white.png'></div></div>
+        </div>
+      </div>
+
+    </div>
+    <div class="clear"></div>
+
+
+
+
+
+    <div id="footer">
+      <div id="footerCenter">
+        <div class="left">
+          <a href="http://media.mit.edu/~greg">Greg Elliott</a> and <a href="http://media.mit.edu/~azinman">Aaron Zinman</a><br>
+          <a href="http://media.mit.edu">MIT Media Lab</a><br>
+          Limited Beta Release<BR>
+        </div>
+        <div class="right">
+          <a href="/about">About</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
+                    href="/presskit">Press Kit</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://twitter.com/konbitmit">Follow us on Twitter</a>
+        </div>
+      </div>
+    </div>
+  </div>
+  </body>
+
+
+
+  <!--[if lt IE 7.]>
+  <script defer src="js/pngfix.js"></script>
+  <![endif]-->
+</html>