1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-16 08:16:55 +00:00

modified ui of contacts; clean code & rm unused files

This commit is contained in:
llj 2012-05-12 15:52:07 +08:00
parent be5954a669
commit ea45a6c999
11 changed files with 41 additions and 285 deletions

View File

@ -11,18 +11,18 @@
{% block right_panel %}
<h2>添加联系人</h2>
<form action="{{ SITE_ROOT }}contacts/add/" method="post">
<form action="{{ SITE_ROOT }}contacts/add/" method="post" class="contact-op-form">
{% if error_msg %}
<p class="error">{{ error_msg }}</p>
{% endif %}
{{ form.user_email.as_hidden }}
<label for="id_email">邮箱:</label>
<label>邮箱:</label>
{{ form.contact_email }}<br />
<label for="id_name">名字(可选):</label>
<label>名字(可选)</label>
{{ form.contact_name }}<br />
<label for="id_note">备注(可选):</label>
<label>备注(可选)</label>
{{ form.note }}<br />
<input type="submit" value="提交" />
<input type="submit" value="提交" class="submit" />
</form>
{% endblock %}

View File

@ -11,20 +11,20 @@
{% block right_panel %}
<h2>编辑联系人</h2>
<form action="" method="post">
<form action="" method="post" class="contact-op-form">
{% if error_msg %}
<p class="error">{{ error_msg }}</p>
{% endif %}
{{ form.user_email.as_hidden }}
<label for="id_email">邮箱:</label>
<label>邮箱:</label>
{{ form.contact_email }}<br />
<label for="id_name">名字(可选):</label>
<label>名字(可选)</label>
{{ form.contact_name }}<br />
<label for="id_note">备注(可选):</label>
<label>备注(可选)</label>
{{ form.note }}<br />
<input type="hidden" name="contact_id" value="{{ contact_id }}" />
<input type="hidden" name="old_contact_email" value="{{ old_contact_email }}" />
<input type="submit" value="提交" />
<input type="submit" value="提交" class="submit" />
</form>
{% endblock %}

View File

@ -10,12 +10,12 @@
{% block right_panel %}
<h2>联系人列表</h2>
<table class="contact-list default">
<table>
<tr>
<th width="20%">邮箱</th>
<th width="25%">邮箱</th>
<th width="20%">名字</th>
<th width="44%">备注</th>
<th width="16%">操作</th>
<th width="11%">操作</th>
</tr>
{% for contact in contacts %}
<tr>
@ -23,7 +23,7 @@
<td>{{ contact.contact_name }}</td>
<td>{{ contact.note }}</td>
<td>
<button id="contact-edit-btn" data="{{ SITE_ROOT }}contacts/edit/?email={{ contact.contact_email }}" class="contact-edit-btn">编辑</button>
<button data="{{ SITE_ROOT }}contacts/edit/?email={{ contact.contact_email }}" class="contact-edit-btn">编辑</button>
<button data="{{ SITE_ROOT }}contacts/delete/?email={{ contact.contact_email}}" class="contact-delete-btn">删除</button>
</td>
</tr>

View File

@ -15,6 +15,12 @@ ul > li { list-style:none; }
.mgt10 { margin-top:10px; }
.center { text-align:center; }
.label { color:#333; font-size:12px; font-style:normal; }
.notification {
padding:5px;
width:580px;
background:#FDF;
margin:10px 0;
}
a { color:#ee8833; text-decoration:none; font-weight:bold; }
a:hover { color: #ff9933; text-decoration: underline; }
img { border:none; }
@ -31,7 +37,12 @@ tr.first { background-color: #00FF00; }
#wrapper { font: 13px/1.5 Arial, Helvetica, sans-serif; }
#header, #main, #footer { width:950px; }
#header, #main { margin:0 auto; }
#header { font-size: 14px; font-weight: bold; margin-bottom:12px; }
#header {
font-size: 14px;
font-weight: bold;
border-bottom: 1px solid #ddd;
margin-bottom: 12px;
}
#left-panel { float:left; width:120px; }
#right-panel { float:right; width:800px; }
#footer { color:#999; padding-top:2px; margin:25px auto; border-top:1px solid #DDD; }
@ -42,10 +53,11 @@ tr.first { background-color: #00FF00; }
.top-bar a { color:#ddd; font-weight:normal; }
.top-bar a:hover { background:#A0A; }
/* #header */
#header .top-info { margin-bottom:8px;}
#other-info { color: #ccc; text-align:right; }
#other-info .wish { font-style:italic; margin-bottom:10px; }
#other-info .version { font-size: 12px; }
#header .nav { border-bottom: 1px solid #ddd; margin-top:8px; }
#header .nav { }
#header .nav li { float: left; height: 18px; padding: 0px 25px 4px 0; background: none; }
#header .nav a, #header .nav a:visited { color:#8A948F; font-weight:bold; text-decoration:none; }
#header .nav a.cur { color: #000; }
@ -124,9 +136,6 @@ label { display: inline-block; margin:2px 0px; }
.pwd_change .submit {
margin-left:6em;
}
/* form */
/* forms */
/* popup dialog */
#basic-modal-content {display:none;}
#simplemodal-overlay {background-color:#000; cursor:wait;}
@ -136,68 +145,7 @@ label { display: inline-block; margin:2px 0px; }
#simplemodal-container a.modalCloseImg {background:url(../img/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-16px; cursor:pointer;}
#simplemodal-container h3 {color:#84b8d9;}
/* home */
#home-snapshot { border:1px solid #000; float:right; margin:0 0 0 20px; }
strong { color:#808; font-weight: normal; }
.home-page h2 { color: #e83; }
#main-show {
margin: 0 0 25px 50px; padding: 10px 10px;
border-radius: 3px; -moz-border-radius: 3px;
box-shadow: rgba(0, 0, 0, 0.0976562) 0px 8px 16px;
-webkit-box-shadow: rgba(0, 0, 0, 0.0976562) 0px 8px 16px;
-moz-box-shadow: rgba(0, 0, 0, 0.0976562) 0px 8px 16px;
width: 800px;
height: 235px;
}
#main-show #feature-list {
margin: 0 0 0 20px;
font-size: 16px;
color: #808;
}
#main-show #feature-list li {
background-position:left 11px;
line-height: 32px;
}
#seafile-show .show-item {
margin: 20px 0 0 0;
width: 420px; height: 140px; float: left;
padding: 10px;
border: 1px solid #f0f0f0;
border-radius: 10px; -moz-border-radius: 10px;
}
#seafile-show .show-item2 {
margin: 20px 0 0 50px; width: 420px; height: 140px; float: left;
padding: 10px;
border: 1px solid #f0f0f0;
border-radius: 10px; -moz-border-radius: 10px;
}
#seafile-show img { float: left; margin: 0 8px 8px 0; }
#seafile-show p { color: #444; font-size: 15px; margin-left: 10px; }
#seafile-what {
margin-top: 20px;
float: left;
width: 440px;
}
#seafile-history {
float: left;
margin: 20px 0 0 70px;
width: 440px;
}
div.home-page h2 { font-style: italic; }
/* help pages */
.help-page { width: 550px; }
.help-page img { display: block; margin: 20px auto; }
#id_repo_id { width:300px; }
span.small-action-link { font-size: 9px; }
input.ccnet_id { width: 400px; }
.notification {
padding:5px;
width:580px;
background:#FDF;
margin:10px 0;
}
/*myhome*/
.repo-list {
margin-bottom: 12px;
}
@ -254,3 +202,11 @@ input.ccnet_id { width: 400px; }
color:#e83;
font-weight:normal;
}
/*contact*/
.contact-op-form label {
width:6em;
text-align:right;
}
.contact-op-form .submit {
margin-left:6em;
}

View File

@ -41,32 +41,7 @@
<p class="version">服务器版本: {{ seafile_version }}</p>
</div>
</div>
{% block nav %}
<ul class="nav ovhd">
<li>
<a href="{{ SITE_ROOT }}home/">主页</a>
</li>
<li>
<a href="{{ SITE_ROOT }}help/">使用帮助</a>
</li>
<li>
<a href="{{ SITE_ROOT }}download/">下载</a>
</li>
<li>
<a href="/vanilla/">论坛</a>
</li>
<!--
<li>
<a href="{{ SITE_ROOT }}peers/">Peers</a>
</li>
-->
<!--
<li>
<a href="{{ SITE_ROOT }}groups/">Groups</a>
</li>
-->
</ul>
{% endblock %}
{% block nav %}{% endblock %}
</div>
<div id="main">
<div id="left-panel">

View File

@ -1,26 +0,0 @@
{% extends "base.html" %}
{% block left_panel %}
{% endblock %}
{% block right_panel %}
<div class="download-page">
<h2>下载</h2>
<h3 id="windows">Windows</h3>
<p>
<a href="http://www.gonggeng.org/~gonggeng/ccnet-0.8.1.msi">Ccnet/Seafile 0.8.1 for Windows XP</a>
</p>
<h3 id="linux">Linux</h3>
<p>
<a href="http://www.gonggeng.org/~gonggeng/ccnet_0.8.2_i386.deb">Ccnet/Seafile 0.8.2 for Ubuntu 11.10 32bit</a>
</p>
<p>
<a href="http://www.gonggeng.org/~gonggeng/ccnet_0.8.2_amd64.deb">Ccnet/Seafile 0.8.2 for Ubuntu 11.10 64bit</a>
</p>
</div> <!-- help-page -->
{% endblock %}

View File

@ -1,94 +0,0 @@
{% extends "base.html" %}
{% block main_panel %}
<div class="home-page">
<div id="main-show">
<img src="{{ MEDIA_URL }}img/seafile-small.png" id="home-snapshot" />
<h2>
Seafile: 我自己的云存储
</h2>
<p>
<ul id="feature-list">
<li>本地完整的版本历史: 查看文件的任一版本</li>
<li>安全可靠的同步功能: 不会弄丢文件或修改</li>
<li>安全方便的协同工作: 安全的合并他人修改</li>
<li>数据安全可随时迁移: 可以搭建个人服务器</li>
</ul>
</p>
<div class="clear"></div>
</div>
<div id="seafile-show">
<div class="show-item">
<h2>P2P 同步</h2>
<img width="150px" src="{{ MEDIA_URL }}img/sync-cc.png" />
<p>用户可以创建<strong>多个文件盒</strong>。每个文件盒可以放置任意的文件和目录。每个文件盒可以在任意两台计算机间同步,无需借助服务器。</p>
</div>
<div class="show-item2">
<h2>多服务器</h2>
<img width="150px" height="115px" src="{{ MEDIA_URL }}img/sync-cs.png" />
<p>每台计算机都可以配置成服务器。可为每个文件盒选择不同的服务器。每次同步会做一个新的版本记录,原来的文件状态得到<strong>完整的保存</strong>,不用担心同步过程丢失文件或丢失对文件的修改。</p>
</div>
<div class="clear"></div>
<div class="show-item">
<h2>版本历史</h2>
<img width="150px" src="{{ MEDIA_URL }}img/history-back.png" />
<p>完整的本地版本历史。不用联网,用户就可以浏览文件的任意一个版本,可以找回任意一个删除的文件。也可以把整个目录恢复到任意一个历史状态。</li></p>
</div>
<div class="show-item2">
<h2>安全协作</h2>
<img width="150px" src="{{ MEDIA_URL }}img/sync-csc.png" />
<p>多人协作,自动进行修改的合并,完整的版本历史保证绝不会丢失自己的修改。</p>
</div>
<div class="clear"></div>
</div>
<div id="seafile-what">
<h2>什么是 Ccnet/Seafile <img src="{{ MEDIA_URL }}img/information.png" width="24px" /></h2>
<p>
Seafile 是一个文件<strong>版本管理和同步共享</strong>工具。 Ccnet 则是一个网络连接管理工具, 用于支持 Seafile 的同步共享功能。
</p>
<p>
Seafile 适合于以下的应用场合:
<ul>
<li>对文件资料进行版本管理。</li>
<li>个人在多台电脑间同步数据。</li>
<li>一个小组共同维护一个文件仓库, 比如建立一个电子书的仓库。 </li>
</ul>
</p>
<p>
Seafile 采用了以用户<strong>个人计算机为中心的设计方法</strong>。 我们提供了一个本地的文件资料管理工具。 用户可以从任意一个文件夹创建一个 Seafile 文件盒。 文件盒记下了文件夹每一个历史状态, 可以加密、导出历史文件。 这些操作均无需联网。
</p>
<p>联网后, 用户可以在<strong>任意两台计算机之间进行数据同步</strong>。 为了支持非同时在线的用户间的数据同步, 用户可以选择一台服务器为文件的中转站(我们也把服务器叫做<strong>中继</strong>)。 通过中继, 多个用户就可以更加方便的进行文件的同步。
</p>
</div>
<div id="seafile-history">
<h2>Ccnet/Seafile 历史 <img src="{{ MEDIA_URL }}img/history.png" width="24px" /></h2>
<p>Ccnet/Seafile 项目的最初目标是让用户(包括我们自己)能够<strong>方便而安全的</strong>在多台机器之间同步数据。</p>
<p>设想, 假如你有一台电脑, 我有一台电脑, 我们能够建立网络连接(比如在同一个局域网内) 原理上说, 进行数据同步的基本条件都具备了。 但是为什么我们之间的数据同步就这么难呢? </p>
<p>Ccnet/Seafile 项目就是为了接近这样的一个目标: 只要我们能联网, 不一定要借助于服务器, 我们就能方便的进行信息的传递和数据同步。 Ccnet 解决按照用户所需进行互联的问题, Seafile 解决同步的问题。</p>
<p>从 2009 年开始, 经过三年多的摸索和开发, 我们终于做出了一个可以工作的产品, 并提供给大众使用。</p>
</div>
</div> <!-- home page -->
{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "myhome_base.html" %}
{% block nav_home_class %}class="cur"{% endblock %}
{% block nav_myhome_class %}class="cur"{% endblock %}
{% block left_panel %}
<h3>已用空间</h3>
<p>{{ quota_usage|filesizeformat }} / 2 GB</p>

View File

@ -2,7 +2,7 @@
{% block nav %}
<ul class="nav ovhd">
<li>
<a href="{{ SITE_ROOT }}home/my/" {% block nav_home_class %}{% endblock %}>我的页面</a>
<a href="{{ SITE_ROOT }}home/my/" {% block nav_myhome_class %}{% endblock %}>我的页面</a>
</li>
<li>
<a href="{{ SITE_ROOT }}shareadmin/" {% block nav_shareadmin_class %}{% endblock %}>共享管理</a>

View File

@ -1,55 +0,0 @@
{% extends "base.html" %}
{% block title %}Peers{% endblock %}
{% block left_panel %}
<ul>
<li><a href="?type=mypeer">My Peers</a></li>
<li><a href="?type=all">All Peers</a></li>
</ul>
{% endblock %}
{% block right_panel %}
<h3>Users</h3>
<table class="user-list default">
<tr>
<th>Name</th>
<th>ID</th>
<th>Roles</th>
<th>My Roles On User</th>
<th>Action</th>
</tr>
{% for user in users %}
<tr>
<td>{{ user.props.name }}</td>
<td>{{ user.props.id }}</td>
<td>{{ user.props.role_list }}</td>
<td>{{ user.props.my_role_list }}</td>
<td></td>
</tr>
{% endfor %}
</table>
<h3>Peers</h3>
<table class="peer-list default">
<tr>
<th>Name</th>
<th>ID</th>
<th>Roles</th>
<th>My Roles On Peer</th>
<th>Action</th>
</tr>
{% for peer in peers %}
<tr>
<td>{{ peer.props.name }}</td>
<td>{{ peer.props.id }}</td>
<td>{{ peer.props.role_list }}</td>
<td>{{ peer.props.my_role_list }}</td>
<td></td>
</tr>
{% endfor %}
</table>
{% endblock %}

View File

@ -27,6 +27,7 @@ urlpatterns = patterns('',
(r'^accounts/', include('base.registration_urls')),
(r'^$', root),
#url(r'^home/$', direct_to_template, { 'template': 'home.html' } ),
url(r'^home/my/$', myhome, name='myhome'),
url(r'^home/owner/(?P<owner_name>[^/]+)/$', ownerhome, name='ownerhome'),
@ -34,7 +35,6 @@ urlpatterns = patterns('',
url(r'^shareadmin/addshare/$', repo_add_share, name='repo_add_share'),
(r'^shareadmin/removeshare/$', repo_remove_share),
(r'^download/$', direct_to_template, { 'template': 'download.html' } ),
(r'^repo/(?P<repo_id>[^/]+)/$', repo),
(r'^repo/history/(?P<repo_id>[^/]+)/$', repo_history),
(r'^repo/token/modify/(?P<repo_id>[^/]+)/$', modify_token),