操作: Job application内容类型

到现在为止,学校可以发布招聘信息了,如果用户可以对他们感兴趣的职位发简历就更好了。我们要创建另外一个内容类型叫做“Job Application” 或简称为 “application”,以下是用到的数据域:
• Title (the normal node title)普通节点标题
• Introductory message (the normal node body)普通节点主体
• Job (node reference field)节点引用
• Résumé (file field)文件域
 

1.到主内容类型设置页Administer→Content management→
Content types (admin/content/types),点击页面顶部的”Add content type“添加另外一个内容类型。

2.在添加内容类型页,按表3-12填写表单。我们又一次使用drupal内核提供的标题和主题构成开始的两个数据项(Title 和Introductory message)

     表3-12.  Job内容类型的设置

Field Value
Identification  
Name Job Application
Type application
Description An application for a job position
Submission form settings  
Title field label Title
Body field label Introductory message

 

 3点击保存提交表单之后,新的内容类型就创建成功了。点击“Job application”的“manage fields”链接(admin/content/node-type/application/fields)。使用表3-13,添加一个“job"类型的引用。这样就把“Job application”类型的节点和”job“类型的节点联系起来了。
  

  表3-13 添加job节点的引用数据域

Field Value
Label Job
Field name  job
Select a field type Node reference
Select a widget  Select list

4.点击保存,然后用表3-14配置job节点引用数据项。

        表3-14. job节点引用数据项的配置

Field  Value
Global settings  
Required Checked
Content types that can be referenced Job

5.job application内容类型的最后一个需求就是一个供用户上传简历或其他文件的文件域。我们可以使用内核提供的文件上传模块,但是CCK的有更好的配置选项。我们将使用FileField 模块的文件域。点击“manage fields” (admin/content/
node-type/application/fields),使用表3-15的设置来添加一个文件域,然后点继续。

表3-15. 简历文件域的设置

Field Value
Label Résumé
 Field name  resume
Select a field type File
Select a widget type File Upload

 

6.在下一页,继续填写一些更详细的配置信息,参考表3-16,然后点击“Save field settings”按钮。我们要重新限制一下可以上传的文件的后缀,只容许文档文件。而且在一个"files"子目录显示所有上传的文件。FileField 模块也容许你控制application 节点上文件的可见性。以下提供的设置将强制文件一直被列出,没有改变这个设置的可能。然而,这里的选项容许灵活的排序。

  表3-16. 简历文件域的设置

Field Value
Job Application settings  
Permitted upload file extensions pdf doc txt rtf pages odf
Path settings > File path Resumes
Global settings  
Required  Checked
Default list value Listed
How should the list value be handled? Enforce Default
Description Field Disabled

 

支持的上传文件后缀会自动列在文件域下面,所有就没有必要在帮助文本里面写了。

 

7. 现在我们已经添加好了我们需要的数据域。下面按照下面的提示排一下序

• Title
• Job
• Introductory message
• Résumé
• Menu settings

8.最后,在Administer→User management→Permissions (admin/user/permissions)添加这个新内容类型的权限。我们需要登陆的用户能够管理他自己的求职申请,editors 可以管理任何的申请。按照表3-17配置后保存。

 表3-17. Job Applications 内容类型的权限。

Permission: node module anonymous user authenticated user editor site administration
create application content   Checked    
delete any application content     Checked Checked
delete own application content    Checked    
edit any application content     Checked
 
 Checked
edit own application content   Checked    

 
   这样就完成了对 Job Application 内容类型的配置。让我们看一下注册用户登陆后的表单。用用户名和密码登陆后,Create content→Job Application
(node/add/job)如图3-15所示。
 

当你运行Job
Posting安装向导时,这些用户就会自动建好。
 

 

因为求职申请没有职位列表那么重要。我们可以不去配置它的显示选项。但是你还是可以到Administer→Content management→Content types→Job Application→Fields
(admin/content/node-type/application/fields)去配置。当一个用户创建了一个job application后,如图3-16
 

在这个图中有一点很重要,就是我们的节点引用域如何显示。默认的情况是现实一个陪引用节点某个域的链接。当我们在application 中点击 Alumni Director后,我们将回到Alumni Director job页面。显示节点引用域的方式还有许多种,你可以到(admin/content/node-type/application/display).点"Display Fields" 标签配置它。
 

到了这里,该往你的站点里加点内容了。用管理员或editor登陆,到Create content→Job (node/add/job)创建几个job内容。还要创建几个对不同职位的求职申请。到了下一部分,这些内容将很有用处。

 

  图3-15 注册用户看到的求职申请表单

  图3-16 一个求职申请

 

本节完

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.