Commits

Brendan Howell committed 0dc96df

fixes to editor

Comments (0)

Files changed (4)

src/excode.db

Binary file modified.
         sqlsession = self.SqlSession()
         corpus = sqlsession.query(Corpus).filter(Corpus.id==cid).first()
         
+        name = cherrypy.session.get(USER_KEY)
+        user = sqlsession.query(User).filter(User.name==name).first()
+        owner = corpus.creator
+        if user == owner:
+            isowner = True
+        else:
+            isowner = False
         #check if round has advanced
         #  then redirect to corpus edit page
         if(int(round) < corpus.current_round_index):
         template = tmpldir + "/wait.tmpl"
         page = Template(file=template)
         page.cid = cid
+        page.owner = isowner
         
         return unicode(page)
         

src/templates/header.tmpl

 	<script type="text/javascript">
 	tinyMCE.init({
 		// General options
-		mode : "textareas",
-		theme : "simple",
-
-		theme_advanced_toolbar_location : "top",
-		theme_advanced_toolbar_align : "left",
+          mode : "textareas",
+	  theme : "advanced",
+	  theme_advanced_toolbar_location : "top",
+	  theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist",
+	  theme_advanced_buttons2 : "",
+	  theme_advanced_buttons3 : "",
+          theme_advanced_resizing : true
 	});
 	</script>
 	</head>

src/templates/wait.tmpl

 #include "templates/header.tmpl"    
+    #if $owner:
+    <a href="advanceround?cid=$cid">Corpus Owner... advance the round</a>
+    #else:
     <h3>please wait for the round to advance...</h3>
-    <p><a href="/corpus?cid=$cid">click here</a> when the proctor says it's ok
+    #end if
 #include "templates/footer.tmpl"