Updated comments & schema DDL

This commit is contained in:
Suraj 2016-02-15 09:40:35 +05:30
parent ca9a110526
commit 930a75c045
3 changed files with 18 additions and 9 deletions

View File

@ -13,6 +13,15 @@ Notes: omninotesweb
/*-------------------------------------- /*--------------------------------------
Layout Layout
-------------------------------------- */ -------------------------------------- */
.commentslist {
background-color: #f5f5f5;
}
.comment {
padding-left: 25px;
padding-top: 5px;
}
ul{ ul{
list-style-type: none; list-style-type: none;
} }

View File

@ -11,3 +11,5 @@ finish_date timestamp
CREATE TABLE files(name varchar(1000) not null, autoName varchar(255) not null); CREATE TABLE files(name varchar(1000) not null, autoName varchar(255) not null);
CREATE TABLE category( id integer primary key autoincrement ,name varchar(1000) not null); CREATE TABLE category( id integer primary key autoincrement ,name varchar(1000) not null);
CREATE TABLE comments(id integer primary key autoincrement, content ntext, taskID references task(id));

View File

@ -54,21 +54,19 @@
<span class="noteContent"> <span class="noteContent">
{{$value.Content}} {{$value.Content}}
<span class="noteComments"> <div class="commentslist">
<ul>
{{range $value.Comments}} {{range $value.Comments}}
<li>{{.Content}}</li> <div class="comment">{{.Content}}</div>
{{end}} {{end}}
<li> <div class="comment">
<form method="POST" action="/add-comment/"> <form method="POST" action="/add-comment/">
<textarea rows="2" cols="30" name="commentText" placeholder="Add Comment"></textarea> <textarea rows="1" cols="30" name="commentText" placeholder="Add Comment"></textarea>
<input type="text" class="hidden" name="taskID" value="{{$value.Id}}"> <input type="text" class="hidden" name="taskID" value="{{$value.Id}}">
<input type="submit" value="Comment" class="btn btn-primary" /> <input type="submit" value="Comment" class="btn btn-primary" />
</form> </form>
</li> </div>
</ul> </div>
</span>
</span> </span>
<span class="notefooter"> <span class="notefooter">