5/7 完成新建教师用户 修改部分图标 合并到主分支

教师用户的新建直接复用了注册账户的代码,这样可以保持一致。虽然之前的考虑是管理员新建教师账户的时候只能设置用户名用户昵称,手机号和邮箱之类的个人信息最好是新建好之后让教师自己填写,不过用户创建的时候还有各种用户验证,最终还是决定用统一的界面好了。但是我还是觉得不应该让管理员有修改用户信息的权限,因此在列表页中只有详情和删除,没有编辑功能。

侧边栏的图标采用了font-awesome库中的一些图标,只需要用i标签,修改class就行,还是非常方便的。研究了一下字体图标的原理,truetype字体本来就是一种矢量图标,那么就可以不“画”字,改成直接“画”图标,然后把class下的内容对应到一个字符编码,我们就可以像用一个字符一样来用一个图标了。效果也不错:


对应代码:

<div id="sidebar-left" class="span2">
	<div class="nav-collapse sidebar-nav">
		<ul class="nav nav-tabs nav-stacked main-menu">
			<li><div style="height:50px"/></li>
			<li><a href="<%= departments_path%>"><i class="icon-building"></i><span class="hidden-tablet"> 学院管理</span></a></li>
			<li><a href="<%= courses_path%>"><i class="icon-book"></i><span class="hidden-tablet"> 课程管理</span></a></li>
			<li><a href="<%= keywords_path%>"><i class="icon-tag"></i><span class="hidden-tablet"> 关键词管理</span></a></li>
			<li><a href="<%= teachers_path%>"><i class="icon-group"></i><span class="hidden-tablet"> 教师管理</span></a></li>
			<li><a href="<%= admin_edit_path%>"><i class="icon-user"></i><span class="hidden-tablet"> 修改账户</span></a></li>
		</ul>
	</div>
</div>

今天第三个事情是把之前的全部工作合并到主分支去,然而本地分支推到我之前的background推的好好的,推master就会报错:

To https://github.com/mottled233/SDU-Learning-resource-aggregation-platform.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/mottled233/SDU-Learning-resource-aggregation-platform.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

non-fast-forward可以说是一种常见错误了,大概意思就是你的本地分支和远程分支有冲突,不能直接推上去,通常的解决思路是先git pull origin master 下来,git add -A,git commit 一下,再git push 就好。然而可能是我每次都是拉master,写完,更新推到自己的background上,虽然pull master告诉我已经up to date了,但是就是不能再推回去。不得已采取了曲线救国的策略:

创建本地分支master:

$ git checkout -b master origin/master

将本地background合并到本地master:

$ git merge background

推上去:

$ git push

在github上检查一下:


ok,解决问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值