-
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.
- Loading branch information
Showing
7 changed files
with
116 additions
and
5 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 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,27 @@ | ||
<#include "/layout/_layout.html" /> | ||
<@head title="首页|四眼井|互联网人的乐园 "></@head> | ||
<@body> | ||
<div class="clearfix"> | ||
<div class="ui-grid-19"> | ||
<div class="mgl-20"> | ||
<div class="ui-box clearfix"> | ||
<div class="ui-box-title"> | ||
<h3>xxx<span style="">(<span>10</span>)</span></h3> | ||
<a href="#" class="ui-box-title-more" title="管理我的应用">More</a> | ||
</div> | ||
<div class="ui-box-content"> | ||
<ul class="ui-article-list"> | ||
<#list activitylist.getList() as a> | ||
<li> | ||
<a href="/activity/show?id=${a.id}"> | ||
${a.title} | ||
</a> | ||
</li> | ||
</#list> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</@body> |
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,49 @@ | ||
package me.thinkjet.controller.admin; | ||
|
||
import me.thinkjet.model.Activity; | ||
import me.thinkjet.model.ActivityPhoto; | ||
|
||
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/photo", viewPath = "admin/") | ||
public class PhotoController extends Controller { | ||
|
||
@Before(CacheInterceptor.class) | ||
@CacheName("photo") | ||
public void index() { | ||
setAttr("plist", Activity.dao.paginateByCache("photo", | ||
"photo-index" + this.getParaToInt("page", 1), | ||
this.getParaToInt("page", 1), 12, "select *", "from activity_photo order by desc")); | ||
} | ||
|
||
public void add() { | ||
render("add.html"); | ||
} | ||
|
||
public void create() { | ||
Activity a = getModel(Activity.class); | ||
a.set("author", /* this.getSession().getAttribute(SESSION_ID) */1); | ||
a.save(); | ||
render("index.html"); | ||
} | ||
|
||
public void update() { | ||
Activity a = getModel(Activity.class); | ||
a.update(); | ||
render("show.html"); | ||
} | ||
|
||
public void edit() { | ||
setAttr("a", Activity.dao.findById(getPara("id"))); | ||
} | ||
|
||
public void delete(){ | ||
ActivityPhoto.dao.deleteById(this.getAttr("id")); | ||
this.render("index/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<#include "/layout/_layout.html" /> | ||
<@head title="首页|四眼井|互联网人的乐园 "></@head> | ||
<@body> | ||
<div class="clearfix"> | ||
<div class="ui-grid-19"> | ||
<div class="mgl-20"> | ||
<div class="ui-box clearfix"> | ||
<div class="ui-box-title"> | ||
<h3>xxx<span style="">(<span>10</span>)</span></h3> | ||
<a href="#" class="ui-box-title-more" title="管理我的应用">More</a> | ||
</div> | ||
<div class="ui-box-content"> | ||
<ul class="ui-article-list"> | ||
<#list activitylist.getList() as a> | ||
<li> | ||
<a href="/activity/show?id=${a.id}"> | ||
${a.title} | ||
</a> | ||
</li> | ||
</#list> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</@body> |
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