-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from tidezyc/master
1
- Loading branch information
Showing
15 changed files
with
216 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
14 changes: 6 additions & 8 deletions
14
WebRoot/WEB-INF/views/activity/add.html → ...oot/WEB-INF/views/admin/activity/add.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
WebRoot/WEB-INF/views/activity/edit.html → ...ot/WEB-INF/views/admin/activity/edit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<#include "/layout/admin/_layout.html" /><@head title="四眼井-后台管理系统 "></@head><@body> | ||
<div class="ui-box"> | ||
<div class="ui-box-title"> | ||
<h3>xxx<span style="">(<span>10</span>)</span></h3> | ||
<a href="/admin/activity/add" class="ui-box-title-more" title="发布活动">发布</a> | ||
</div> | ||
<div class="ui-box-content"> | ||
<ul class="ui-article-list"> | ||
<#list activitylist.getList() as a> | ||
<li> | ||
<a href="/admin/activity/show?id=${a.id}">${a.title}</a> | ||
</li> | ||
</#list> | ||
</ul> | ||
</div> | ||
<div> | ||
<#include "/layout/_paginate.html" /> | ||
<@paginate currentPage=activitylist.pageNumber totalPage=activitylist.totalPage actionUrl="/admin/activity?page="/> | ||
</div> | ||
</div> | ||
</@body> | ||
<@script> | ||
</@script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<#include "/layout/admin/_layout.html" /><@head title="四眼井-后台管理系统 "></@head><@body> | ||
<div class="ui-box"> | ||
<div class="ui-box-title"> | ||
<h3>查看活动</h3> | ||
</div> | ||
<div class="ui-box-container ui-box-content"> | ||
<div class="ui-form"> | ||
<div class="ui-form-item"> | ||
<label for="" class="ui-label"> | ||
活动标题 | ||
</label> | ||
<div> | ||
${a.title} | ||
</div> | ||
</div> | ||
<div class="ui-form-item"> | ||
<label for="" class="ui-label"> | ||
活动内容 | ||
</label> | ||
<div> | ||
${a.content} | ||
</div> | ||
</div> | ||
<div class="ui-form-item"> | ||
<a href="/admin/activity/edit?id=${a.id}">edit</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</@body> | ||
<@script> | ||
</@script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<#include "/layout/admin/_layout.html" /> | ||
<@head title="首页|四眼井|互联网人的乐园 "> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | ||
<script src="/upload/jquery.uploadify.min.js" type="text/javascript"></script> | ||
<link rel="stylesheet" type="text/css" href="/upload/uploadify.css"> | ||
<style type="text/css"> | ||
body { | ||
font: 13px Arial, Helvetica, Sans-serif; | ||
} | ||
</style> | ||
</@head> | ||
<@body> | ||
<form> | ||
<div id="queue"></div> | ||
<input id="file_upload" name="file_upload" type="file" multiple="true"> | ||
</form> | ||
|
||
</@body> | ||
<@script> | ||
<script type="text/javascript"> | ||
$(function() { | ||
$('#file_upload').uploadify({ | ||
'swf' : '/upload/uploadify.swf', | ||
'uploader' : 'upload/img' | ||
}) | ||
}); | ||
</script> | ||
</@script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package me.thinkjet.controller.admin; | ||
|
||
import me.thinkjet.model.Activity; | ||
|
||
import com.jfinal.aop.Before; | ||
import com.jfinal.core.Controller; | ||
import com.jfinal.ext.route.ControllerBind; | ||
import com.jfinal.plugin.ehcache.CacheInterceptor; | ||
import com.jfinal.plugin.ehcache.CacheName; | ||
|
||
@ControllerBind(controllerKey = "/admin/activity", viewPath = "admin/activity") | ||
public class ActivityController extends Controller { | ||
|
||
@Before(CacheInterceptor.class) | ||
@CacheName("activity") | ||
public void index() { | ||
int page = this.getParaToInt("page", 1); | ||
setAttr("activitylist", Activity.dao.paginateByCache("activity", | ||
"activity_" + page, page, 4, "select *", | ||
"from activity order by id desc")); | ||
} | ||
|
||
public void add() { | ||
render("add.html"); | ||
} | ||
|
||
public void create() { | ||
Activity a = getModel(Activity.class); | ||
a.save(); | ||
this.redirect("index"); | ||
} | ||
|
||
public void update() { | ||
Activity a = getModel(Activity.class); | ||
a.update(); | ||
this.setAttr("a",a); | ||
this.render("show.html"); | ||
} | ||
|
||
public void show() { | ||
setAttr("a", Activity.dao.findById(getPara("id"))); | ||
} | ||
|
||
public void edit() { | ||
setAttr("a", Activity.dao.findById(getPara("id"))); | ||
} | ||
|
||
public void delete() { | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.