跳转到主要内容

编辑进度RestAPI

项目描述

Develop Master

一个Plone扩展,通过RestAPI公开编辑进度

主要功能

  1. RestAPI编辑进度

    $ curl -H 'Accept: application/json' --user admin:admin -i http://localhost:8080/Plone/a-page/@editing.progress
    
    or
    
    $ curl -H 'Accept: application/json' --user admin:admin -i http://localhost:8080/Plone/a-page?expand=editing.progress

安装

  • eea.progress.editing添加到您的requirements.txtconstraints.txt文件中,并运行

    pip install -r requirements.txt -c constraints.txt
  • 或者,如果您正在使用buildout,请将eea.progress.editing添加到您的buildout中的eggs部分,并重新运行buildout

    [buildout]
    eggs +=
      eea.progress.editing
  • 或者通过docker

    $ docker run --rm -p 8080:8080 -e ADDONS="eea.progress.editing" plone/plone-backend
  • 重启Plone

  • 网站设置 > 扩展中安装eea.progress.editing

  • 通过控制面板 > 编辑进度设置配置编辑进度

  • 如果您已经有针对您的内容类型编辑进度的Plone 4定义,您可以在/portal_progress/document/view.export处将它们导出为XML,然后使用xml2dict.py脚本来将它们转换为Plone 6注册表。输出应如下所示

    {
      "Document": [
        {
          'condition': 'python:value',
          'hideReady': 'False',
          'iconEmpty': 'eea-icon eea-icon-edit',
          'iconReady': 'eea-icon eea-icon-check',
          'labelEmpty': 'Please set the {label} of this {context.portal_type}',
          'labelReady': 'You added the {label}',
          'link': 'edit#fieldsetlegend-default',
          'linkLabel': 'Add {label}',
          'prefix': 'title',
          'states': ['all']
        },
                  {
          'condition': 'python:value',
          'hideReady': 'False',
          'iconEmpty': 'eea-icon eea-icon-edit',
          'iconReady': 'eea-icon eea-icon-check',
          'labelEmpty': 'Please set the {label} of this {context.portal_type}',
          'labelReady': 'You added the {label}',
          'link': 'edit#fieldsetlegend-default',
          'linkLabel': 'Add {label}',
          'prefix': 'description',
          'states': ['all']
        },
        ...
      ]
    }

源代码

Eggs仓库

Plone版本

该软件已开发并测试适用于Plone 4、5和6。

如何贡献

请参阅贡献指南(CONTRIBUTING.md)

资金

EEA - 欧洲环境局(EU)

变更日志

2.0 - (2024-06-01)

  • 重大变更:删除Plone 4 GenericSetup配置文件[avoinea - 参考 #151690]

  • 重大变更:重命名Editing Progress ControlPanel和注册表[avoinea - 参考 #151690]

1.5 - (2023-06-01)

  • 功能:Plone 6增加了编辑进度控制面板[Petchesi-Iulian - 参考 #151690]

1.4 - (2021-12-16)

  • 更改:修复包分类器和python_requires[avoinea]

1.3 - (2021-06-21)

  • 功能:引入了@@editing.progress.status浏览器视图,用于检查当前状态是否输入了所有字段,对工作流守卫很有用[ichim-david 参考 #124587]

1.2 - (2021-06-10)

  • 更改:将工作流状态信息也添加到REST API中,这样我们就知道字段应为哪个状态而需要[ichim-david 参考 #124587]

1.1 - (2021-05-04)

  • 更改:以字典的形式返回字段信息[ichim-david 参考 #124588]

  • 更改:我们现在为每个字段导出一个字典列表,而不是列表的列表,这使得它更容易阅读和理解导出的内容[ichim-david 参考 #124588]

  • 提供字段的编辑进度完成信息[ichim-david 参考 #124588]

1.0 - (2021-05-04)

  • 初始发布

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源代码分布

eea.progress.editing-2.0.zip (80.2 kB 查看哈希值

上传时间 源代码

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面