generator:
  class:              sfPropel13AdminGenerator
  param:
    model_class:      Tbldocument
    theme:            default

    fields:
      ##user: { name: Username}
      ##doc_name: { name: Title}
    list:
      title: Document list
      actions:
        _create: { name: Add}
        _createbatch: { name: Add batch}
        _del:
          name: Delete
          params: confirm=Are you sure?

      display: [_check, =doc_name, =_media, doc_filename, _content_summary, doc_rating, _user, doc_hit, doc_date]
      fields:
        doc_name: { name: Title, params: size=20}
        media: { name: Thumbnail, params: size=5}
        content_summary: { name: Description}
        user: { name: Username}
        doc_category: { name: Category}
        doc_user: { name: By user, params: size=15}
        doc_filename: { name: File name}
        comments: { name: Comments}
        check: { name: check all}
        doc_hit: { name: Num downloaded}
        doc_rating: { name: Rating, params: size=30}
        doc_desc: { name: Description}
        doc_status: { name: Status}
        doc_date: { name: Date post, params: date_format='H:m-dd/MM/yyyy'}
      filters: [_doc_category, _doc_user, doc_name, doc_desc, _doc_status]
      sort: [doc_date, desc]
      max_per_page: 20

    edit:
      title: edit document "%%doc_name%%"
      display:
        "Document": [doc_name, _doc_category, _media, doc_filename, doc_desc, doc_keyword, doc_rating]
        "Infomation": [doc_source, doc_hit, _doc_status]
        "Comments": [_doc_comments]
      fields:
        doc_date: { type: plain, params: date_format='dd/MM/yy'}
        doc_desc: { name : Description, params: rich=true tinymce_options=height:300,width:580}
        doc_category: { name: Category}
        doc_date: { name: Post time}
        doc_name: { name: Title}
        doc_status: { name: Status}
        doc_source: { name: Source}
        doc_comments: { name: Comments}
        doc_rating: { name: Rating}
        doc_keyword:
          name: Keyword
          type: textarea_tag
          params: size=50x2


        media:
          name: Thumbnail
          help:Click "Tao thumbnail" if want to create new thumbnail!.
        doc_source:
          name: Source
          help: Ghi ro nguon goc
        doc_hit:
          name: Num downloaded
        doc_filename:
          name: File name
          help: Chon duong dan cho tu lieu (JPG, SWF)
          type: admin_input_file_tag
          upload_dir: resources
          params:
            size:50
            include_link=data
            include_remove=true

